S
samadams_2006
Hello,
I have the following piece of code in an Excel .xla add-in:
---------------------------------------------------------------------------------------------------------------------------
Dim MenuBar As CommandBar
Dim MenuItem As CommandBarControl
Application.CommandBars("Worksheet Menu Bar").Controls("New
Menu").Delete
Set MenuBar = Application.CommandBars("Worksheet Menu Bar")
Set MenuItem = MenuBar.Controls.Add(Type:=msoControlPopup)
MenuItem.Caption = "New Menu"
---------------------------------------------------------------------------------------------------------------------------
This works fine when I have the following Reference checked:
Microsoft Office 11.0 Object Library
Since not all people who will be using this .xla will have this version
of the Object Library, I would like to change this from Early Binding
to Late Binding. Unchecking this Reference gives me numerous problems
when I try to run the program.
Can anyone tell me what the corresponding code would be for "Late
Binding"?
Thanks,
Sam.
I have the following piece of code in an Excel .xla add-in:
---------------------------------------------------------------------------------------------------------------------------
Dim MenuBar As CommandBar
Dim MenuItem As CommandBarControl
Application.CommandBars("Worksheet Menu Bar").Controls("New
Menu").Delete
Set MenuBar = Application.CommandBars("Worksheet Menu Bar")
Set MenuItem = MenuBar.Controls.Add(Type:=msoControlPopup)
MenuItem.Caption = "New Menu"
---------------------------------------------------------------------------------------------------------------------------
This works fine when I have the following Reference checked:
Microsoft Office 11.0 Object Library
Since not all people who will be using this .xla will have this version
of the Object Library, I would like to change this from Early Binding
to Late Binding. Unchecking this Reference gives me numerous problems
when I try to run the program.
Can anyone tell me what the corresponding code would be for "Late
Binding"?
Thanks,
Sam.