View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
joel joel is offline
external usenet poster
 
Posts: 9,101
Default Building Menus with Macros upon opening Excel

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




"VBA-PA" wrote:

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