|
-
Jun 23rd, 2004, 12:55 PM
#1
Thread Starter
Hyperactive Member
Splitting a name Function...help!
I have the name like this: SEAL, RANDALL R or it can look like this: SEAL RANDALL R The data comes both ways. I need to split into firstname and lastname. I just want to include the middle initial with the firstname. I need help with my function to do so. This is what I have so far:
Function SplitName(ByVal WholeName As String)
Dim arr() As String
Dim FirstName As String
Dim LastName As String
WholeName = Replace(WholeName, ",", " ")
arr = Split(WholeName, " ")
LastName = arr(0)
FirstName = arr(1)
End Function
Please help me. How do I return LastName and FirstName also? HELP!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|