GeekInterview
|
Geeks Forum
|
Online Quiz
|
Learning Center
|
Privacy
|
Terms and Conditions
|
Contact
Home
>
Code Samples
>
VB.NET
> Split Name to First and last Name
Split Name to First and last Name
Description:
Split Name to First and last Name
Date added:
06 February, 2007
Submitted By:
Lokesh
Rating:
0
Download:
N/A
Instructions:
Public Function Sample() MsgBox getFirst_Name("LOKESH MURTHY") MsgBox getLast_Name("LOKESH MURTHY") End Function
Source Code:
Public Function getFirst_Name(Full_Name As String) On Error Resume Next If IsNull(Full_Name) = True Or Len(Trim(Full_Name)) = 0 Then getFirst_Name = " " End If Dim I As Long For I = Len(Full_Name) To 1 Step -1 If Mid(Full_Name, I, 1) = " " Then getFirst_Name = Mid(Full_Name, 1, I) Exit Function End If Next I End Function Public Function getLast_Name(Full_Name As String) On Error Resume Next If IsNull(Full_Name) = True Or Len(Trim(Full_Name)) = 0 Then getLast_Name = " " End If Dim I As Long For I = Len(Full_Name) To 1 Step -1 If Mid(Full_Name, I, 1) = " " Then getLast_Name = Trim(Mid(Full_Name, I, 999)) Exit Function End If Next I End Function
WidgetBucks - Trend Watch - WidgetBucks.com
Comments
[
Leave Comment
]
Your name:
E-mail (optional):
Text:
Please enter code
shown on image:
Posted by
bhanudas
at 19 November, 2007
good code
Tips
[
Leave Tip
]
Your name:
E-mail (optional):
Text:
Please enter code
shown on image:
No tips added yet. Be the first one to share tip.
Reviews
[
Leave Review
]
Your name:
E-mail (optional):
Rate:
1
2
3
4
5
6
7
8
9
10
Text:
Please enter code
shown on image:
No reviews added yet. Be the first one to review.
Tags
Source Code
Related Items
Random Number Game
Recover Tables Data from Corrupt MS Access Database
Number Puzzle
XML CODE
Send email using Gmail Mail Server
Related Categories
Code Samples » VB.NET
Projects » VB.NET
Copyright @
GeekInterview.com