|
-
Jul 8th, 2001, 07:27 AM
#1
Replace statment
Is there a way I can use the Replace statment so it ignores case?
-
Jul 8th, 2001, 10:05 AM
#2
Lively Member
Code:
Replace(lcase(sText),"text to replace","text to replace with")
That should be working just fine (if I didn't mess up the syntax )
-
Jul 8th, 2001, 11:52 AM
#3
Well If I do that then it will change all the output text to lower case
-
Jul 8th, 2001, 12:23 PM
#4
Fanatic Member
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
-
Jul 8th, 2001, 12:32 PM
#5
I tried that and it didnt work, No error either
-
Jul 8th, 2001, 12:46 PM
#6
Fanatic Member
That's strange...can you post the line that's giving you the trouble?
Chris
-
Jul 8th, 2001, 12:52 PM
#7
Fanatic Member
Did you try:
Replace( strMyString, strToReplace, strReplacement, 0, len(strMyString), 1)
Chris
-
Jul 8th, 2001, 12:54 PM
#8
Well I used
Replace( strMyString, strToReplace, strReplacement, 0, Len(strMyString), 1)
I will try yours
-
Jul 8th, 2001, 12:57 PM
#9
Fanatic Member
That should've worked...
Chris
-
Jul 8th, 2001, 12:59 PM
#10
I tired it and it didnt work, It gave me a "Object Required Error" on the same line
-
Jul 8th, 2001, 01:00 PM
#11
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?
-
Jul 8th, 2001, 01:03 PM
#12
Fanatic Member
The constant for vbTextCompare is 1
Chris
-
Jul 8th, 2001, 01:52 PM
#13
Still dosent work for me
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|