I need to figure out in VB how to check a character in a string - a certain position.
Such as
string - "abcdefg"
Need to check position 1 (a) and 3 (c).
Was thinking something like (position what ever the correct code to use)
for I = 1 to len(strStringToCheck) Step 1
position(I, strStringToCheck) 'position(pos number, string)
Loop
I have tried the left property, but that takes all from the left. I mean on "abcdefg", left("abcdefg", 3) would return "abc" - but I need to just get the character in pos 3 "c"
Now the second I need to figure out is ASCII values.
Want to try a couple of things one of which will check what key is pressed on Form_Click(), and if that key is lets say "enter" (I belive 13 in ASCII, don't remember anymore lol) something happens.
Also to convert ASCII number values to charater outputs.
This is for a school project I am finishing up on, so any help is appreciated. When I was using/learning C++ these two things were easy to figure out. But am fairly new to VB so I ask your help
Thanks in advance,
Tony
Such as
string - "abcdefg"
Need to check position 1 (a) and 3 (c).
Was thinking something like (position what ever the correct code to use)
for I = 1 to len(strStringToCheck) Step 1
position(I, strStringToCheck) 'position(pos number, string)
Loop
I have tried the left property, but that takes all from the left. I mean on "abcdefg", left("abcdefg", 3) would return "abc" - but I need to just get the character in pos 3 "c"
Now the second I need to figure out is ASCII values.
Want to try a couple of things one of which will check what key is pressed on Form_Click(), and if that key is lets say "enter" (I belive 13 in ASCII, don't remember anymore lol) something happens.
Also to convert ASCII number values to charater outputs.
This is for a school project I am finishing up on, so any help is appreciated. When I was using/learning C++ these two things were easy to figure out. But am fairly new to VB so I ask your help
Thanks in advance,
Tony