Application.VBE.CommandBars -- Compile error

C

chandb

I have a large VBA Excel 2003 project that compiles on my and several
other PCs, but doesn't on a single user's PC (which should be an
identical build).

The compile error highlights an issue with the following...

Dim cbrAll as CommandBars
....
set cbrAll = Application.VBE.CommandBars

I get an 'Error in Loading DLL' returned when I Debug > Compile on
this user's machine and the second line above is highlighted.
(Compiles without any issues on my machine.)

Qn: which DLL is it refering to? (am assuming it is C:\Program Files
\Common Files\Microsoft Shared\Office11\MSO.dll -- the Office 11
Object Library, but am not sure).

I think this holds the Application.CommandBars object, but not the
Application.VBE.CommandBars object ??

We both have exactly the items checked with the same priorities in the
VBE > Tools > References:
-- VBA
-- Excel 11 Object Library
-- OLE Automation
-- MS Office 11 Object Library
-- MS Forms 2.0 Object Library
-- MS XML 5.0

Any help much appreciated.
 
P

Peter T

Qn: which DLL is it refering to?

maybe VBE6EXT.dll

try adding a reference to this dll, it's description under references is -
Microsoft Visual Basic for Applications Extensibilty 5.3

Regards,
Peter T
 
C

chandb

maybe VBE6EXT.dll

try adding a reference to this dll, it's description under references is -
Microsoft Visual Basic for Applications Extensibilty 5.3

Regards,
Peter T













- Show quoted text -

Thanks Peter, I'll try that on his machine.
Strange though that this compiles on my PC even though I don't have
the Extensibility reference checked.

Can't see why his PC has a different behaviour!

Thanks for your help.
 

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

Top