does anyone know of any site or anyone have a tutorial on strings ... like using left, mid, right, instr (i don't really know how to use them and don't know most of the commands to work with strings ...
Printable View
does anyone know of any site or anyone have a tutorial on strings ... like using left, mid, right, instr (i don't really know how to use them and don't know most of the commands to work with strings ...
In vb type "Instr" an then press F1.
Browse the help on "String Functions" and read the online help... they are very good at showing you what they can do.
The Left function returns a specified amount of character's starting from the Left (beginning) of the string
The Right function returns a specified amount of character's starting from the right (end) of the stringCode:RetVal = Left("MyString", 5)
'Returns "MyStr"
'First part is the string you are using
'Second part is the how many character's you want to return (starting from the left)
The Mid function returns a specified amount of character's starting from a specified location of the string.Code:RetVal = Right("MyString", 5)
'Returns "tring"
'First part is the string you are using
'Second part is the how many character's you want to return (starting from the Right)
Code:RetVal = Mid("MyString", 2, 3)
'Returns "ySt"
'First part is the string you are using
'Second part is the position you want to start from
'Third part is the how many character's you want to return (starting from the
'position specified in the Second part)
i can't press f1 cause i don't have all the help files installed but i will check the online help ... thanks megatron for clearing up left,right n mid ...