It appears you have not yet registered with DEVPPL. To register please click here... (it's fast, easy and free!)

Forum

Log In Sponsors
Board index Programming Visual Basic Forum

Searching through variable character by character

Moderator: dafunkymunky

Searching through variable character by character

Postby lalitac on Fri Mar 25, 2011 8:06 pm

is there any way of searching through the characters of a variable?
lalitac
 
Posts: 3
Joined: Mon Mar 21, 2011 9:50 pm

Re: Searching through variable character by character

Postby sanjon on Thu Apr 28, 2011 9:21 pm

You could use Mid().

ex.
Dim char As Char
char = Mid([name of string], [starting place], [length, in your case it would be 1])

And that's it. Just make this into a loop and increase the starting place each time. And then compare the char to the one you are searching for to check if they match.
sanjon
 
Posts: 40
Joined: Sun Dec 05, 2010 6:20 pm


Who is online

Users browsing this forum: No registered users and 4 guests