Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Excel UserForms basic question 2

Status
Not open for further replies.

Andrzejek

Programmer
Jan 10, 2006
8,502
US
Excel 2010
Alt-F11 opens VBA editor. I can right-click in VBA Project window and Insert - User Form several times, which creates several UserForms.
When I click Run, last instered UserForm shows up.

How can I control which UseerForm shows up first when I Run it?

Have fun.

---- Andy

A bus station is where a bus stops. A train station is where a train stops. On my desk, I have a work station.
 
Whichever form is active in the editor window is the one that will be executed.
 
Actually after F5 vba will try to run what it has in active window. It will run macro or show form if code or designer window is active (has focus). Otherwise it will ask for macro name. Note that clicking the same form in project explorer moves focus to project explorer window (toolbox disappears), after F5 user will be asked for macro name.

combo
 
Thanks guys :)

Have fun.

---- Andy

A bus station is where a bus stops. A train station is where a train stops. On my desk, I have a work station.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top