Building Menus with Macros upon opening Excel

V

VBA-PA

I have a macro that successfully creates a menu. However, it appears as if
the menu is deleted right after it is created. Does Excel load the
excel11.xlb after the auto_open macros run?

Any suggestions on how I can create menu items at start-up.

Thanks
 
J

Joel

Try converting the auot_open to a worksheet open event. auto_open is an
older version of the worksheet open event. The auto_open goes back to excel
95 & 97. The workbook open event was invented in excel 2000.

To modify the code move the auto open from a module to THISWORKBOOK and
change the parameters passed. I believe the only difference between the two
type macros is the order they run when the workbook is opened.

Private Sub Workbook_Open()
'your code here
End Sub

or

Private Sub App_WorkbookOpen(ByVal Wb As Workbook)
'your code here
End Sub
 
H

Homey

No it does not. Seem something else is deleting your menu.

|I have a macro that successfully creates a menu. However, it appears as if
| the menu is deleted right after it is created. Does Excel load the
| excel11.xlb after the auto_open macros run?
|
| Any suggestions on how I can create menu items at start-up.
|
| Thanks
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top