How do I get User Form to run at start up?

  • Thread starter Thread starter Bafa
  • Start date Start date
B

Bafa

When I start my Excel file I have to choose tools/macros/visual basic
editor and the open Userform1 and choose to run it. How can I make my
file user friendly for my co-workers by having them open my file and
instantly have the UserForm appear?
 
Hi
In the Editor project explorer window double click the ThisWorkbook
module. In the dropdown on the top left where it says (General), choose
the Workbook option. The shell of the Workbook_Open macro should
appear.
Now simply put Userform1.Show in this sub and the userform will show
when you open the workbook.
regards
Paul
 
In the code module for ThisWorkbook:

Private Sub Workbook_Open()
UserForm1.Show
End Sub

Mike F
 
Back
Top