VBA editor opens automatically

  • Hi,


    I have a userform which opens when the workbook is opened.


    Code
    Private Sub Workbook_Open()
    UserForm1.Show
    End Sub


    However, when I open the workbook, it also opens the VBA editor in front of the userform and it highlights Userform1.show in yellow. Only after I minimise the vba editor, I can see the userform. How can I disable the VBA editor from popping up?


    Thx!

  • Hi Eureka18,
    Obviously, there is an error in the UserForm_Initialize procedure. Open the UserForm module, fix the error, and everything will be fine.

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!