Trim like worksheet Trim
Otto,
UseReplace
Debug.Print Replace(" This is long word ", " ", "")
--
HTH
Bob Phillips
"Otto Moehrbach" wrote in message
...
Excel 2002, Win XP
The worksheet Trim function trims all the spaces, leading, trailing,
and
all but one space between words.
In VBA I have LTrim for leading spaces, RTrim for trailing spaces, and
Trim for both.
I realize that I can use the worksheet Trim function in VBA to do all
the spaces, but is there another way in VBA to get the same functionality
as
the worksheet Trim function?
Thanks for your help. Otto
|