Data types.

  • Thread starter Thread starter Tom
  • Start date Start date
T

Tom

Hello,

I have TextBox1 with this Value = 57.7
I need do something like this

MyNewVar = CDbl(TextBox1) .... but this is Type mismatch error 13

I need transform text value to number value.

Thanks Tom
 
Yes but after this it will be String, String is using for text, I need
Double or Single.

Tomas
 
This is big problem. for example when I want do tihs in Forms:

TextBox1 = 23
TextBox2 = 100

If TextBox1 > TextBox2 Then
MsgBox "YES"
End If


Program said YES. And same problem I hve in another parts in my program.
 
I tried this:

rem this is part which start after click on OK button in my Form

MyVar = TextBox.Value
MsgBox TypeName(MyVar)

and its String
 
I found this....I was supid

I used Double but I have to use Currency so:

MyNewVar = CCur(Text.Box)

its enough for me, now everything works like I need

Thanks
 
I use it becase I give some data to TextBox for look in my Form and then I
take this data and put them to Worksheet.
 
Back
Top