View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Chip Pearson Chip Pearson is offline
external usenet poster
 
Posts: 7,247
Default Replace Space charcter in a string variable

In VBA6 (Excel 2000 and later) there is a Replace function that
replaces text within character strings. E.g.,

Dim S As String
S = "abcdefg"
S = Replace(S, "abc", "xyz")
Debug.Print S


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com



"pikus " wrote in message
...
He specifically said he was working with a string variable, not

info in
a cell. Now the info may actually be in a cell, but without

knowing I
didn't want to assume. That being said, Replace only works on

Range
objects right? So it wouldn't work with a string... Please

tell me if
I'm wrong about that. - Pikus


---
Message posted from http://www.ExcelForum.com/