0

hi can anyone help me about my problem how can i come up w/ this solution for example

1 + 2.00

the answer should

3.00

or like this 1.35+2.00

the answer should

3.35

how can i do this?

4
Contributors
7
Replies
8
Views
8 Years
Discussion Span
Last Post by QVeen72
0

hi comatose i have 2 textbox 1 is text3 and the second is text4 and i have also 1 label in may label1 the caption is "00.00" all i want is everytime i click my command button for example if i input in the text 3 3.75 and text4 is 2 the label1.caption should come up w/ this answer 5.75.

0

You can't take what is above and modify it for your needs?

label1.caption = CDbl(text3.text + text4.text)
0

Hello try this, for example the name of your command button is "cmdadd"

Private Sub cmdadd_Click()
Dim ans
ans=val(text3.Text) + val(text4.text)
label1.Caption=ans
End Sub

or

Private Sub cmdadd_Click()
label1.Caption=val(text3.Text) + val(text4.text)
End Sub
0

comatose the answer dont have a decimal .00 its only 2 it should 2.00

0

one of the textboxes needs to have the decimal point in it.... in text3 type in 2, in text 4 type in 3.3... now what?

In order to make it work with zeros, you need to look at "format" or format$

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.