Search the VB 2005 documentation for string functions. You should find something similar to Left(params), Mid(params), and Right(params).
In VB 6, Left(string, length
) will return a substring of string
, starting with the first character of string
, of length
) does the same thing starting from the last character of string
and working backwards for length
Mid(string, start, [length]
) will produce a substring of string
characters, starting at the character in the position specified by start
All of these functions will, if the requested substring would be longer than what's available, return everything that is
available without causing an error. Something to keep in mind when using them. You can create a working program that produces strange and bizarre results.
Since I've only dabbled with VB 2005, I'm not sure if the string functions would be exactly the same, but they should be similar. If they exist. If M$ decided that such useful functions weren't needed... Let's just say that nothing that M$ does surprises me, any more.
Edited by MattV, 30 September 2007 - 10:09 PM.