Link to home
Start Free TrialLog in
Avatar of Gardiun
Gardiun

asked on

Getting info from a string in a listbox

Say there are multiple strings of information in a list box with a person's first name then last name then phone number in that order, and there is a button next to the list box that should only get the selected person's first name from the string and stores it in a global variable. How do you code the button so this occurs?
ASKER CERTIFIED SOLUTION
Avatar of waty
waty
Flag of Belgium image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Gardiun
Gardiun

ASKER

It has a problem with this line:
sFirsName = Left(sLine , 1, nPos-1)

The message read "wrong number of arguments or invalid property assignment." What did you declare nPos as?
Dim sFirsName as String
dim sLine as String
dim nPos  as long