ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Building Menus with Macros upon opening Excel (https://www.excelbanter.com/excel-programming/430942-building-menus-macros-upon-opening-excel.html)

VBA-PA

Building Menus with Macros upon opening Excel
 

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

joel

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


Homey

Building Menus with Macros upon opening Excel
 

Does Excel load the excel11.xlb after the auto_open macros run?


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

"VBA-PA" wrote in message
...
|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



All times are GMT +1. The time now is 02:12 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com