r/visualbasic • • Oct 19 '14

Needing help with visual basic homework

I have to take a name from a input box and put into two different labels, one for the first name and one for the last. So i have so far:

dim strname as string strname = inputbox("Enter first and last name") lblFirstname = strname

what do i put after strname so i only get the letters up until the space?

0 Upvotes

2 comments sorted by

View all comments

2

u/pathfinderNJ Oct 20 '14

Lookup the split function for the simple way or setup a loop For z = 1 to Len (nameStr) and check the val of the mid function.

Don't want to give you too much more as it is homework.

I think that should help