M
mmmbert
In an add-in I have created, a custom menu item is created, it is
disabled at the end of the macro that created it with:
CommandBars(1).Controls("blah blah").Enabled = False
I did this because not all workbooks should be able to use it. The
menu is created and greyed out when Excel is started.
In the workbook_open macro of theworkbooks I want the menu to be
available, I placed:
CommandBars(1).Controls("blah blah").Enabled = True
to turn it back on. When the workbook opens, I get:
"Object variable or with block not set"
I haven't been able to figure it out. Any help would be appreciated.
disabled at the end of the macro that created it with:
CommandBars(1).Controls("blah blah").Enabled = False
I did this because not all workbooks should be able to use it. The
menu is created and greyed out when Excel is started.
In the workbook_open macro of theworkbooks I want the menu to be
available, I placed:
CommandBars(1).Controls("blah blah").Enabled = True
to turn it back on. When the workbook opens, I get:
"Object variable or with block not set"
I haven't been able to figure it out. Any help would be appreciated.