It gets the first character of, up to,
the first three words in Application.Username.
Public Function UserInitials() As String
Dim vaNames As Variant
Dim sInit As String
Dim lMax As Long
Dim i As Long
vaNames = Split(UCase(Application.UserName), " ")
lMax = Application.WorksheetFunction.Min(2, UBound(vaNames))
For i = 0 To lMax
sInit = sInit & Left$(vaNames(i), 1)
Next i
UserInitials = sInit
End Function
dinsdag 2 september 2008
Abonneren op:
Reacties posten (Atom)
Geen opmerkingen:
Een reactie posten