Create formulas using multiple pop-up input boxes?

R

rcross23

Hey guys,

I'm trying to create a macro so that whenever i hit the keys assigned t
the macro, it will bring up a serious of pop-up input boxes, so that
can enter data (both numeric and text) and then have it create
pre-defined formula using the information that was entered into th
boxes.

For instance, one formula i would like to make a macro for would b
=cw_act("X","Y->Z"), where X, Y, and Z would be populated by the inpu
boxes.

Even better would be if the pop-up box would have a pre-populated lis
of formula options and then depending on which one i select (by number
it would dictate which pop-up boxes I am given and therefore whic
formula is created.

Any help would be greatly appreciated! Thanks
 
R

rcross23

Anyone? Bueller? I know someone has to know how to do this.. It woul
really help me out.
 
M

merjet

With multiple inputs the best way is likely to add a UserForm in the
VB Editor. Have the macro show it. Put TextBoxes on it for the inputs
to the formula, a CommandButton to trigger calculating the formula,
and a Label to show the result (which you could put elsewhere, e.g. in
a cell).
 
M

merjet

If you don't want one UserForm for all the inputs, the macro can show
InputBoxes.
Sub Macro1()
x1 = InputBox("prompt #1")
x2 = InputBox("prompt #2")
'call formula
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top