Is there a way I can use the Replace statment so it ignores case?
Printable View
Is there a way I can use the Replace statment so it ignores case?
That should be working just fine (if I didn't mess up the syntax :))Code:Replace(lcase(sText),"text to replace","text to replace with")
Well If I do that then it will change all the output text to lower case :(
You can use vbTextCompare... use a 1
Replace( strYourString, strToReplace, strReplacement, 1)
should do it...
The full syntax is:
Replace( string, stringToReplace, replacementString [, start [, count[, compare]]])
Chris
I tried that and it didnt work, No error either :(
That's strange...can you post the line that's giving you the trouble?
Chris
Did you try:
Replace( strMyString, strToReplace, strReplacement, 0, len(strMyString), 1)
Chris
Well I used
Replace( strMyString, strToReplace, strReplacement, 0, Len(strMyString), 1)
I will try yours
That should've worked...
Chris
I tired it and it didnt work, It gave me a "Object Required Error" on the same line
I tired it and it didnt work, It gave me a "Object Required Error" on the same line.
you sure its supposed to be 1?
The constant for vbTextCompare is 1
Chris
Still dosent work for me :(