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 Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search and Replace?

Status
Not open for further replies.

99mel

Programmer
Oct 18, 1999
379
GB
Hi all,

Is there a function which searches through a string for a character, then replaces each one found with something (in my case, i just want the character deleting)

Thanks for any help.

 
Dim strMyString As String
Dim strMyStringReplaced As String
strMyString = "Here I will remove all the spaces"
strMyStringReplaced = Replace(strMyString, " ", "", 1, , vbTextCompare)
Debug.Print strMyStringReplaced
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top