When I extract a string from a website the textbox shows:
<!-- --> <!-- Principal - CIIU 64207 - TELECOMUNICACIONES --> <!-- --> 6190 - OTRAS ACTIVIDADES DE TELECOMUNICACIONES
I use this code to delete the lines and spaces
Texto = Trim(Replace(Trim(Replace(Trim(Tabla(24)), "-->", "")), "<!--", ""))
.Txt_Act_Economica.Value = Trim(Texto)
The result is:
Principal - CIIU 64207 - TELECOMUNICACIONES 6190 - OTRAS ACTIVIDADES DE TELECOMUNICACIONES
The Function Trim doesn't delete the spaces in the middle and in the end of the string.