une


Can you use InStr() to determine the position of the next character in a string that is not equal to one of a number of options. If so, how

For example, what would be the syntax of an expression that returned the position of the next character that was not either a "t", space, tab or return character Would you have to use ascii representations of some or all of these characters in the exepression




Re: Use of InStr() function

Wildert


Sounds like you'd have to loop through each character in the string and examine if that char is what you want, and if it is, exit the loop.




Re: Use of InStr() function

une

Thanks, but I was thinking that a single InStr() statement could do it, I just am not sure of how to arrange the arguments within the function call.




Re: Use of InStr() function

Andy Pope

Hi,

The Instr function is designed to find characters/text. So search for text that is not there will not work.

Looping through the characters is the normal way of doing it.

Another possible approach is to use Regular Expressions. I'm not really clued up on there use but a bit of googling should provide more help.