- Home
·
- String Manipulation
·
- Gets the Initials from a name in a string variable, it also accepts a delimiter such as . or if y
Gets the Initials from a name in a string variable, it also accepts a delimiter such as . or if y
Gets the Initials from a name in a string variable, it also accepts a delimiter such as "." or if you prefer no delimiter just send ""
Rate Gets the Initials from a name in a string variable, it also accepts a delimiter such as . or if y
(1(1 Vote))
Dim CCount As Integer
Dim I as integer
Dim Cur As String
Dim BolInit As Boolean
Dim strInitials As String
CCount = Len(Trim(Name))
BolInit = True
For I = 1 To CCount
Cur = Mid(Name, I, 1)
If BolInit Then
strInitials = strInitials & Cur & Delimiter
BolInit = False
End If
If Cur = " " Then BolInit = True
Next I
Initials = strInitials
End Function
Gets the Initials from a name in a string variable, it also accepts a delimiter such as . or if y Comments
No comments yet — be the first to post one!
Post a Comment