coverting from

You can access all the old VB6 String functions (Left, Right, Split,
and Mid which is now called Substring, etc.) by typing any string
variable followed by a . and the name, just like accessing any method
from a class. You can also do this with any normal string,
"like this".Left(4)

Code:
sValue = Data.Left(3)

For your text conversion, look in the System.Text namespace for
various encoders and decoders.
 
im tearin me hair out :( ive tried....
Dim s as string
If s.Substring(1, 1) = "." Then Me.BeGold(s)

( ".") being the first character of the nickname
also tried
If s.Substring(1, s) = "." Then Me.BeGold(s)
and If s.Substring(1, 1) is "." Then Me.BeGold(s)
nothing seems to be working tho :S
 
Sorry for confusing you with .Left, I couldve sworn it was there... :)

And the reason it isnt working is because now all indexes are
zero-based. That means that the first characters index is 0, unlike
Mid$ where the first character has the index 1.
 
Or you can use the nifty .StartsWith method

Code:
If myString.StartsWith(".") Then blah
 
Back
Top