View Full Version : Dynamic Calculation in UserForm


MGumbrell
10-10-2008, 02:35 AM
UserForm1 contains 3 x TextBox.

TextBox1 the user inputs a number
TextBox2 the user inputs a number
The User then clicks a ComandButton

What I would like when the ComandButton is clicked is the result of this simple calculation to appear in TextBox3.

TextBox2/TextBox1

Can this be done dynamically or will all results need to be transferred to cells where the calculation is done and returned in TextBox3.

Thanks, Matt

chergh
10-10-2008, 04:03 AM
It would be something like:


userform1.textbox3.value = userform1.textbox2.value / userform1.text1.value


And you place that in the click event of the button.

MGumbrell
10-10-2008, 05:00 AM
Thank you.

Couldn't have been much simpler could it. I was trying too hard making it more complicated than it really was.

Thank you.