nihho
Nov 22nd, 1999, 12:30 AM
Hello,
I have a little problem with conversion a string variable to double one.
Here is the code:
Private Sub Form_Click()
Dim a As Double
Dim b As Double
Dim c As Double
Dim d As String
a=2
b=3
d = Text1.Text
'Text1.Text="a+b"
'I type this when running the form
c = Val(d)
MsgBox c
'I want to get result 5, but it displays 0. 'What's wrong ???
End Sub
Please, help me to get rid of this !!!
I have a little problem with conversion a string variable to double one.
Here is the code:
Private Sub Form_Click()
Dim a As Double
Dim b As Double
Dim c As Double
Dim d As String
a=2
b=3
d = Text1.Text
'Text1.Text="a+b"
'I type this when running the form
c = Val(d)
MsgBox c
'I want to get result 5, but it displays 0. 'What's wrong ???
End Sub
Please, help me to get rid of this !!!