J
John
Dear all
I have custom menu that works OK but I do not seem to be
able to disable or enable seperate menu items.
I tried the following code but this gives an error message:
Menu bar item: TPBQ
Sub DisMenuItems()
Dim TPBQMenu As CommandBarPopup
Set TPBQMenu = CommandBars(1).FindControl
(Type:=msoControlButton, ID:=CommandBars(1).Controls
("TPBQ").ID)
TPBQMenu.Controls("&Export...").Enabled = False
End Sub
Error message:
Runtime error 91:
Object variable or with block variable not set
I am using excel 2002 on win 2000
Any help would be really apppreciated
Kind regards,
John
I have custom menu that works OK but I do not seem to be
able to disable or enable seperate menu items.
I tried the following code but this gives an error message:
Menu bar item: TPBQ
Sub DisMenuItems()
Dim TPBQMenu As CommandBarPopup
Set TPBQMenu = CommandBars(1).FindControl
(Type:=msoControlButton, ID:=CommandBars(1).Controls
("TPBQ").ID)
TPBQMenu.Controls("&Export...").Enabled = False
End Sub
Error message:
Runtime error 91:
Object variable or with block variable not set
I am using excel 2002 on win 2000
Any help would be really apppreciated
Kind regards,
John