AOB
Well-known Member
- Joined
- Dec 15, 2010
- Messages
- 669
- Office Version
- 365
- 2016
- 2013
- Platform
- Windows
Hi everybody,
This has me stumped for some time now...
I'm trying to determine the position of two characters in a string (ASCII 252 or [ü] and ASCII 254 or [þ])
See the below code :
I would imagine that lng252 would evaluate to 17 (it is the 17th character in the test string) and lng254 would evaluate to 22 (it is the 22nd character in the test string)
Instead I'm getting 17 and 12??
Where is it getting 12 from? The 12th character in the string is "t"?
Am I going crazy?
This has me stumped for some time now...
I'm trying to determine the position of two characters in a string (ASCII 252 or [ü] and ASCII 254 or [þ])
See the below code :
Code:
Sub test()
Dim strTest As String
Dim lng252 As Long
Dim lng254 As Long
strTest = "Please use this ülinkþ for instructions"
lng252 = InStr(1, strTest, Chr(252))
lng254 = InStr(1, strTest, Chr(254))
End Sub
I would imagine that lng252 would evaluate to 17 (it is the 17th character in the test string) and lng254 would evaluate to 22 (it is the 22nd character in the test string)
Instead I'm getting 17 and 12??
Where is it getting 12 from? The 12th character in the string is "t"?
Am I going crazy?