Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
apparently, this is not possible ...
Dim cbc As CommandBarControl Set cbc = New CommandBarControl ?? |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
John,
I think the problem is summed up in the help You tried to instantiate an Automation object, but it was not a creatable object. A commandbarcontrol has to be added to a commandbar, it does not exist in it's own right. -- HTH ------- Bob Phillips ... looking out across Poole Harbour to the Purbecks "John A Grandy" wrote in message ... apparently, this is not possible ... Dim cbc As CommandBarControl Set cbc = New CommandBarControl ?? |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
John,
No, that's not possible. You need to use the Add method of the Controls collection to create the new object. Among other things, the CommandBarControl object needs to have a Parent object, its container, so you can't create a new CommandBarControl directly. Use .Add. -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "John A Grandy" wrote in message ... apparently, this is not possible ... Dim cbc As CommandBarControl Set cbc = New CommandBarControl ?? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
VBA Class or Training | Excel Discussion (Misc queries) | |||
CommandBarControl object | Excel Discussion (Misc queries) | |||
Class lists | Excel Discussion (Misc queries) | |||
Class not registered | Excel Discussion (Misc queries) | |||
how do I set up a workbook for a class | New Users to Excel |