CommandBars

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
 
C

Chris O'C via AccessMonster.com

Use the Microsoft Office 11.0 Object library for Access 2003.

Chris
Microsoft MVP
 
E

Emiliano

Chris O'C via AccessMonster.com ha usato la sua tastiera per scrivere :
Use the Microsoft Office 11.0 Object library for Access 2003.

Chris
Microsoft MVP

Why Office 2003 hase 12.0 OL installed instead of 11.0?
I have'nt it.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top