Hello all,
I'm using this code I found in my book, but when I use it I get errors of with block variable not set
Here's the code:
All I'm wanting to do is create a new control so I can then add menu items under it for my worksheet.
Is there a limit to the number of controls on the standard commandbar?
I currently have the standard items, HTML, Andrews Utilities, and ASAP Utilities.
Thanks,
I'm using this code I found in my book, but when I use it I get errors of with block variable not set
Here's the code:
Code:
'Get the index of the Help menu
HelpIndex = CommandBars(1).Controls("Help").Index
'Create new control
Set NewMenu = CommandBars(1).Controls.Add(Type:=msoControlPopup, _
Before:=HelpIndex, Temporary:=True)
'add caption
NewMenu.Caption = "Fi&gures"
All I'm wanting to do is create a new control so I can then add menu items under it for my worksheet.
Is there a limit to the number of controls on the standard commandbar?
I currently have the standard items, HTML, Andrews Utilities, and ASAP Utilities.
Thanks,