Controlla la sintassi...
É un po' che non scrivo in vb...
Function fSumChar(varNum As String) As Long
Dim strNum As String
Dim iCount As Integer
Dim iLen As Integer
Dim lSum As Long
Dim iVal As Long
strNum = varNum
iLen = Len(strNum)
For iCount = 1 To iLen
If InStr("0123456789", Mid$(strNum, iCount, 1)) = 0 Then
MsgBox "NUMERO DECIMALE non valido", vbCritical, "AVVISO"
fSumChar = 0
Exit Function
Else
iVal = CLng(Mid$(strNum, iCount, 1))
lSum = lSum + CByte(Mid$(strNum, iCount, 1))
End If
Next
fSumChar = lSum
End Function
Andrea - http://www.MelisWeb.eu/