E
Emiliano
Hi,
I've found some snippets to create CommandBars in Access 97 and in
Access 2000 and I hoped to use them directly in Access 2003.
To try these snippets I configured VBA to use the Microsoft Office 12.0
Object Library reference. I've written the code in the Sub AddNewCB in
a module (Module1) and called it on one form load event. However I get
immediately the error "Call to routine or arguments invalid" on the
last statement of the following snippet:
Sub AddNewCB()
Dim CBar As CommandBar, CBarCtl As CommandBarControl
On Error GoTo AddNewCB_Err
' Create a new floating toolbar and make it visible.
Set CBar = CommandBars.Add(Name:="Sample Toolbar", Position:= _
msoBarFloating)
Other references installed:
Visual Basic for Application
MS Access 11.0 Object Library
Ole Automation
MS DAO 3.6 Object Library
MS ActiveX Data Objects 2.5 Library
My System:
Vista Home Premium
Microsoft Office 2003 SP3
I've found some snippets to create CommandBars in Access 97 and in
Access 2000 and I hoped to use them directly in Access 2003.
To try these snippets I configured VBA to use the Microsoft Office 12.0
Object Library reference. I've written the code in the Sub AddNewCB in
a module (Module1) and called it on one form load event. However I get
immediately the error "Call to routine or arguments invalid" on the
last statement of the following snippet:
Sub AddNewCB()
Dim CBar As CommandBar, CBarCtl As CommandBarControl
On Error GoTo AddNewCB_Err
' Create a new floating toolbar and make it visible.
Set CBar = CommandBars.Add(Name:="Sample Toolbar", Position:= _
msoBarFloating)
Other references installed:
Visual Basic for Application
MS Access 11.0 Object Library
Ole Automation
MS DAO 3.6 Object Library
MS ActiveX Data Objects 2.5 Library
My System:
Vista Home Premium
Microsoft Office 2003 SP3