afeld
asked on
How do I replace "&" in vb6?
hi, I know that
strFormattedString = Replace(strUnformattedStri ng, Chr(39), "")
GetCleanString = strFormattedString
will replace an apostrophe with a blank, but is there a # that will replace an ampersand? My XML document is not happy with them in it...
Thanks in advance!
-Al
strFormattedString = Replace(strUnformattedStri
GetCleanString = strFormattedString
will replace an apostrophe with a blank, but is there a # that will replace an ampersand? My XML document is not happy with them in it...
Thanks in advance!
-Al
ASKER
I tried that, and it still returned an XML document with the same error...
to answer this in the way your looking for, & = 38
strFormattedString = Replace(strUnformattedStri ng, Chr$(38), "")
GetCleanString = strFormattedString
Also, i used Chr$(38) instead of Chr(38),this may help
strFormattedString = Replace(strUnformattedStri
GetCleanString = strFormattedString
Also, i used Chr$(38) instead of Chr(38),this may help
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I tried that, and it still returned an XML document with the same error...
ASKER
Still no luck...
ASKER
whoops, I am stupid. I was cleaning it for &'s and for apostrophes, and it went back to the & before the second clean. It works now. Thanks!
strFormattedString = Replace(strUnformattedStri
GetCleanString = strFormattedString