display userform when opening a spreadsheet


Posted by raj nair on January 28, 2002 1:10 PM

I have a spreadsheet navigator userform defined and would like it to pop up each time a user opens the spreadsheet and would also like it to pop up with a keyboard shortcut.

The excel help mentions app_workbookopen(ByVal Wb As Workbook), but I cannot get it to work. Do I need to define the app , where do I define this procedure, etc ..

any help most appreciated.



Posted by Juan Pablo G. on January 28, 2002 1:34 PM

I don't think you need to go THAT deep.

When in VBE, double click on ThisBook module, and select Workbook on the left and Open on the right.

Then, in between you should put something like

UserForm1.Show

The entire thing should look like this

Private Sub Workbook_Open()
UserForm1.Show
End Sub

Juan Pablo G.