checking for a substring
-
I want to check if my string contains the character '"' how do I check that I am using Instr() presently, but the line of code InStr(sFile, """) but this gives an error Can you please help
-
I want to check if my string contains the character '"' how do I check that I am using Instr() presently, but the line of code InStr(sFile, """) but this gives an error Can you please help
Are you trying to see if the string contains a quote character? If so you need to double it up inside the string. Also are you using vb.net or vb6. If it's .net you should use the 'contains' method
sfile.Contains("""")
If it's not .net then just use
InStr(sFile,"""")
-
Are you trying to see if the string contains a quote character? If so you need to double it up inside the string. Also are you using vb.net or vb6. If it's .net you should use the 'contains' method
sfile.Contains("""")
If it's not .net then just use
InStr(sFile,"""")
I am using vb6 not .net I want to check for a double quote but only " once. Will the expression you stated above check for "" or just " , which i want
-
I am using vb6 not .net I want to check for a double quote but only " once. Will the expression you stated above check for "" or just " , which i want
-
It will check for a single double quote as in ". You need to double it up inside the string though to use it as a literal quote so you need """".
Thanks, it worked