Apr 18, 2002 #1 simoncpage Programmer Joined Apr 4, 2002 Messages 256 Location GB I know this is an easy one but I want to check a string if it contains a certain symbol "_" ???
I know this is an easy one but I want to check a string if it contains a certain symbol "_" ???
Apr 18, 2002 #2 xlbo MIS Joined Mar 26, 2002 Messages 15,080 Location GB Probably an easier way but: For i = 1 to len(myString) vs = mid(myString,i,1) if vs = "_" then -----do stuff else -----do other stuff end if HTH Geoff Upvote 0 Downvote
Probably an easier way but: For i = 1 to len(myString) vs = mid(myString,i,1) if vs = "_" then -----do stuff else -----do other stuff end if HTH Geoff
Apr 18, 2002 #3 JustinEzequiel Programmer Joined Jul 30, 2001 Messages 1,192 Location PH if instr(1, StringToCheck, "_" then msgbox "your string contains '_'" else msgbox "you string does not contain '_'" endif Upvote 0 Downvote
if instr(1, StringToCheck, "_" then msgbox "your string contains '_'" else msgbox "you string does not contain '_'" endif
Apr 18, 2002 Thread starter #4 simoncpage Programmer Joined Apr 4, 2002 Messages 256 Location GB Thanks istr is the function that I just couldnt rememeber cheers! Upvote 0 Downvote