Well, not all
String
s are compatible
Double
s. How would, for example, "Hi" or an empty
String
be converted to a numeric value?
Of course I can't see your dataset, but it seems there are some non-numeric values in there.
What would be a lot safer is to call
Double.TryParse[
^].
Usage as follows:
Dim d As Double
If Double.TryParse(Me.TextBox6.Text, d) Then
Else
End If