D
Danny
Can somebody help me write a macro to TRIM extra spaces? I
tried the example in the built excel help (see below) but
it won't work. I need the macro if I hightlight a range or
highlight the entire worksheet.
Dim MyString, TrimString
Trim->".
' Using the Trim function alone achieves the same result.
TrimString = Trim(MyString) ' TrimString = "<-Trim->".
Thanks in advance.
tried the example in the built excel help (see below) but
it won't work. I need the macro if I hightlight a range or
highlight the entire worksheet.
Dim MyString, TrimString
TrimString = RTrim(MyString) ' TrimString = " <-Trim-MyString = " said:
TrimString = LTrim(RTrim(MyString)) ' TrimString = "<-
Trim->".
' Using the Trim function alone achieves the same result.
TrimString = Trim(MyString) ' TrimString = "<-Trim->".
Thanks in advance.