Hi
It should have been int or long.
VB converts the type automatically. It converts '12 ' to 12 etc but it can't do when it comes to Null
Code:
MyColor = ""
Dim d1 As Integer
d1 = CInt(MyColor)
would throw the error. You need to handle this in the code either by checking the length or like :
Code:
If IsNumeric(MyColor) Then
d1 = CInt(MyColor)
Else
d1 = 0
End If
Cheers
Shasur