Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hello,
I seem to be having trouble with the following code: Sub Workbook_Open() Dim CustomMenu As Object Set CustomMenu = CommandBars("Worksheet Men Bar").Controls.Add(Type:=msoControlPopup, Befo=10) With CustomMenu .Caption = "CustomMenu" End With End Sub Which keeps giving me: Run-time error '91': Object or with variable not set for some reason. However, this code works just fine when saved in it own separate module in a workbook. I am new to Excel programming, but this seems strange. Could someon tell me what I'm doing wrong? Thanks in advance -- Message posted from http://www.ExcelForum.com |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Workbook_Open () | Excel Discussion (Misc queries) | |||
Workbook_Open | Excel Programming | |||
Help with Workbook_Open | Excel Programming | |||
Workbook_open Event | Excel Programming | |||
Workbook_Open() error | Excel Programming |