Hi,

I have VBa function which takes a varibale (integer); is it possible to extract number digits of this variable..

when I use Len function in VBA, it is returning wrong results:
For example for

123 has 3 digits
1234 has 4 digits
123456 has 6 digits
1234567 has 7 digits

[VBA]
Public Function Calc(ByVal AccountNo As Long) As String

Dim Len_accountNo As Integer
Len_accountNo = Len(AccountNo)

Calc = Len_accountNo
End Function

[/VBA]


Will be thankful for any response...