Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Replace Space in a string with character

Status
Not open for further replies.

Technos

Programmer
Mar 15, 2002
47
US
Hi There,
I'm having a string in combo box "option" with blank space in between. now i want to look for the blank space and fill it with any string say "xxx". I know I have to use inStr() but how? Can anybody help?
Thanks,
Technos
PS: Using vbscript
 
If Instr(MyString," ") > 0 then
MyString = Replace(MyString," ", "xxx")
End If


Or you could just use MyString = Replace(MyString, " ", "xxx") but what answer was given in your last post about the same question.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top