Absolutely the same, but with a description and without variables:
Function Proper$(Text$)
''' Capitalizes the first letter in all words.
''' Text (required):
''' The text in which the beginning of words are to be replaced by capital letters.
'''
On Local Error GoTo Failed
With CreateUnoService("com.sun.star.sheet.FunctionAccess")
Proper = .callFunction("PROPER", Array(Text))
End With
Exit Function
Failed:
Msgbox "#" & Err & ": " & Error, MB_ICONSTOP, "macro:Proper()"
End Function
Sub TestProper()
Print Proper("The quick brown fox jumps over the lazy dog")
Print Proper("")
End Sub
edit by @Karolus backtics around Codeblock
Edit: Create a ‘CalcFunctions’ module and call the appropriate function, e.g. CalcFunctions.Proper().