Spaces in string

IanT

Registered User.
Local time
Today, 20:15
Joined
Nov 30, 2001
Messages
191
How can I remove the spaces in the example string!

HICX108-Standard Top -Vendered

Thanks in advance!
 
Can you do this with the replace() function?
 
Here's your coding for you ....

Not sure what process you are going to use to run the code .... but here it is below ...... ( to test you can paste into a mod. and it runs great! )


Function RemoveSpaces()

Dim T, I, C, Z

T = "HICX108-Standard Top -Vendered"

For I = 1 To Len(T)

C = Mid(T, I, 1)
If C = " " Then

Else
Z = Z + C
End If

Next I

msgbox Z

End Function


HOPE THAT HELPS !!!
 

Users who are viewing this thread

Back
Top Bottom