Automate the Userform option

P

Petra

I have developed a userform, and I want the UserForm run
autmatically when the excel workbook is opened. What code
do I use to make work for me.

I would appreciate much any help on matte.
Petra W.
 
D

Dianne

Go to the Visual Basic Editor (Alt+F11).
In the Project Explorer Pane, double-click on the "This Workbook" item.
This will open the code window for the workbook and will create a sub
like this:

Private Sub Workbook_Open()

End Sub

Between these two lines, add
UserForm1.Show (using whatever the name of your form is)

So it ends up looking like this:

Private Sub Workbook_Open()
UserForm1.Show
End Sub
 
A

andres

Place the following code on the workbook project section
in vb

Private Sub_worknook.open()
** your sub**

end sub

andres
 

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