Wednesday, August 18, 2010

How to calculate the value of a textbox in an Excel form?

I want to calculate the value of a textbox in an Excel form based on the inputs the user enters on other textboxes on the same form. Does anyone know how to do this?How to calculate the value of a textbox in an Excel form?
=SUM(A1,A2) This will add the numbers in cell A1 %26amp; A2. You can substitute any cells in the formula.





Hope this is what you are looking for....How to calculate the value of a textbox in an Excel form?
Assume you have 3 text boxes named


Text1, text2 and Text3 in the form Form1


So all you need is that


Form1.Text3.Text = Val(Form1.Text2.Text) + Val(Form1.Text1.Text)





You can change the calculation method easily





You can put this in the TextChanged event in Text3 control





Enjoy my profile, I am the VBAXLMan

No comments:

Post a Comment