G
Gordon
I am trying to add a new (custom) popup control to the menu bar in
VBE....
(Office 98, OS 9.2)
The following code sample.........
Sub CreatePopup()
Dim cbpop As CommandBarControl
Dim cbctl As CommandBarControl
Dim cbsub As CommandBarControl
Application.VBE.CommandBars("Menu Bar").Reset
'Create a popup on main menu
Set cbpop = Application.VBE.CommandBars("Menu Bar"). _
Controls.Add(Type:=msoControlPopup, temporary:=True)
..
..
Generates the following error...........
Run-time error '-2147483640 (80000008)':
Method 'Add' of object 'CommandBarControls' failed
on the Set statement
If I select Help in the dialog box the following help topic appears...
Automation error (Error 440)
..
..
..
I have tried this a couple of different ways, all with more or less
the same result.
Also, if the control type to add is a button (type=1) things work
fine..
Looking for any suggestions!
Does anyone know, is this just not supported in this version?
Am I just missing some obvious step??
Have I completely cracked up???
Any and all help welcome
TIA
Gordon
VBE....
(Office 98, OS 9.2)
The following code sample.........
Sub CreatePopup()
Dim cbpop As CommandBarControl
Dim cbctl As CommandBarControl
Dim cbsub As CommandBarControl
Application.VBE.CommandBars("Menu Bar").Reset
'Create a popup on main menu
Set cbpop = Application.VBE.CommandBars("Menu Bar"). _
Controls.Add(Type:=msoControlPopup, temporary:=True)
..
..
Generates the following error...........
Run-time error '-2147483640 (80000008)':
Method 'Add' of object 'CommandBarControls' failed
on the Set statement
If I select Help in the dialog box the following help topic appears...
Automation error (Error 440)
..
..
..
I have tried this a couple of different ways, all with more or less
the same result.
Also, if the control type to add is a button (type=1) things work
fine..
Looking for any suggestions!
Does anyone know, is this just not supported in this version?
Am I just missing some obvious step??
Have I completely cracked up???
Any and all help welcome
TIA
Gordon