Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Application.VBE.CommandBars -- Compile error

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.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,600
Default Application.VBE.CommandBars -- Compile error

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

"chandb" wrote in message
...
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.



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Application.VBE.CommandBars -- Compile error

On 27 Aug, 15:45, "Peter T" <peter_t@discussions wrote:
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

"chandb" wrote in message

...



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.- Hide quoted text -


- 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.
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Making Application.CommandBars.ExecuteMso method work in 2007 JeffreyW Excel Programming 7 December 11th 07 09:01 PM
Error in CommandBars Trefor Excel Programming 5 June 27th 07 05:58 AM
Compile error in my Application elloss Excel Programming 3 February 23rd 06 09:33 AM
Compile error in my Application elloss Excel Discussion (Misc queries) 1 February 20th 06 02:24 PM
VBAProject name compile error, not defined at compile time Matthew Dodds Excel Programming 1 December 13th 05 07:17 PM


All times are GMT +1. The time now is 12:40 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"