form question: macro calling a form

J

John Smith

I created a working form by choosing tools/macros/visual basic
editor/insert userform. The form works just the way I want it to be.

My question is: is there an easy way to activate the form?

Now, I have to go to the visual basic editor, choose the form from
the project window, and run it. The form does not appear in
tools/macros.

Is there a way to run a macro and have the form appear? Thanks.
 
D

Dave Peterson

You can create a macro that shows the userform:

Option Explicit
Sub MacroNameHere()
Userform1.show
End Sub

Then you can invoke this macro by Tools|Macro|macros...

Or even by plopping a button from the forms toolbar onto a worksheet and
assigning this macro to that button. (You could use a shape from the drawing
toolbar, too.)
 

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