How do I automatically open a UserForm in Excel?

In order to open a UserForm automatically, you will need to use the “open”
event of the Excel workbook.

Here is the code to add to the “ThisWorkbook” object’s Open event:

Private Sub Workbook_Open()
    UserForm1.Show
End Sub

After you save and close the workbook, and then reopen it, the UserForm will automatically appear.

PS. Make sure you save the workbook as an xlsm (macro enabled workbook), because you do have VBA code in it (which is considered a macro)!

Let me know if you have questions.


Posted

in

by

Tags: