You have one of your declerations as an integer and not a string. VB6 tries to devide the result by 2 according to your code above, which means the result is 0/2, resulting in an error. If precision is null, write some error code as in -
If precision = 0 Then
'what you want to do here
Else
percision = Len(numberString) / 2
End If
Hope this solved your problem.
AndreRet
Senior Poster
3,922 posts since Jan 2008
Reputation Points: 334
Solved Threads: 350