Enter a value from a textbox into a formula?


Posted by brian on January 09, 2001 9:20 AM

How do you enter a value from a form textbox into a formula?

This is what i have so far:

ActiveCell.FormulaR1C1 = "=((R[-2]C[-1]-R[-5]C[-1])/R[-5]C[-1])*(12/(12-TestForm.TextBoxData.Text))"

The problem is with "TestForm.TextBoxData.Text". It reads it "as is" instead of as the value the user enters in the textbox.

Any help would be appreciated.

Thanks.

Posted by cpod on January 09, 2001 9:41 AM

Try this:

ActiveCell.FormulaR1C1 = "=((R[-2]C[-1]-R[-5]C[-1])/R[-5]C[-1])*(12/(12-" & TestForm.TextBoxData.Text & "))"



Posted by brian on January 09, 2001 11:42 AM

cpod:

Thanks for all your help. I appreciate it.


brian