You could use:
[VBA]Public Function Calc(ByVal AccountNo As Long) As String

Dim Len_accountNo As Integer
Len_accountNo = Len(CStr(AccountNo))

Calc = Len_accountNo
End Function
[/VBA]

Regards,
Rory