by Humberto Martinez (2 Submissions)
Category: String Manipulation
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Wed 5th September 2001
Date Added: Mon 8th February 2021
Rating: (1 Votes)
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 ""
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
No comments have been posted about Gets the Initials from a name in a string variable, it also accepts a delimiter such as . or if y. Why not be the first to post a comment about Gets the Initials from a name in a string variable, it also accepts a delimiter such as . or if y.