' Collection of code snippets by Arne Vajhøj 
' (likely posted to comp.os.vms/INFO-VAX, INFO-TPU, MACRO32, eksperten.dk, newz.dk, LinkedIn or other place sometime between 1990 and now) 
Function cap1(s As String) As String
    cap1 = StrConv(s, vbProperCase)
End Function

Function cap2(s As String) As String
    cap2 = UCase(Left(s, 1)) & LCase(Right(s, Len(s) - 1))
End Function

Function testcap()
    MsgBox cap1("abc def") & " " & cap2("abc def")
    MsgBox cap1("ABC DEF") & " " & cap2("ABC DEF")
End Function
