ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Automate the Userform option (https://www.excelbanter.com/excel-programming/281638-automate-userform-option.html)

Petra

Automate the Userform option
 
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.

Dianne

Automate the Userform option
 
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

--
Dianne

In ,
Petra typed:
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.




andres

Automate the Userform option
 
Place the following code on the workbook project section
in vb

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

end sub

andres


-----Original Message-----
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.
.



All times are GMT +1. The time now is 04:19 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com