Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 15
Default Referencing error

Hi,
When I try to programmatically add a reference to an ActiveX Data object
Library I get an Application-defined or Object-defined error.

ThisWorkbook.VBProject.References.AddFromFile _
Filename:="C:\Program Files\Common Files\System\ado\msado21.dll"

This is where I get the error. I also tried this:

ThisWorkbook.VBProject.References.AddFromGuid _
GUID:="{ 00000205-0000-0010-8000-00AA006D2EA4 }", Major:=2, Minor:=5


But I still get the same error.
Can someone tell me why this is happening?

Thanx.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Referencing error

Have you registered the Data object with the operating system?

(is the GUID in the registry?)

--
Regards,
tom Ogilvy

"Purnima" wrote in message
...
Hi,
When I try to programmatically add a reference to an ActiveX Data object
Library I get an Application-defined or Object-defined error.

ThisWorkbook.VBProject.References.AddFromFile _
Filename:="C:\Program Files\Common Files\System\ado\msado21.dll"

This is where I get the error. I also tried this:

ThisWorkbook.VBProject.References.AddFromGuid _
GUID:="{ 00000205-0000-0010-8000-00AA006D2EA4 }", Major:=2, Minor:=5


But I still get the same error.
Can someone tell me why this is happening?

Thanx.



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 15
Default Referencing error

No, but the filename and path that I'd specified was correct. Shouldn't that
work then?

"Tom Ogilvy" wrote:

Have you registered the Data object with the operating system?

(is the GUID in the registry?)

--
Regards,
tom Ogilvy

"Purnima" wrote in message
...
Hi,
When I try to programmatically add a reference to an ActiveX Data object
Library I get an Application-defined or Object-defined error.

ThisWorkbook.VBProject.References.AddFromFile _
Filename:="C:\Program Files\Common Files\System\ado\msado21.dll"

This is where I get the error. I also tried this:

ThisWorkbook.VBProject.References.AddFromGuid _
GUID:="{ 00000205-0000-0010-8000-00AA006D2EA4 }", Major:=2, Minor:=5


But I still get the same error.
Can someone tell me why this is happening?

Thanx.




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Referencing error

It has to be registered in the operating system. If you go to
tools=References and you can't find it there, then it is not registered
with the operating system.

--
Regards,
Tom Ogilvy

"Purnima" wrote in message
...
No, but the filename and path that I'd specified was correct. Shouldn't

that
work then?

"Tom Ogilvy" wrote:

Have you registered the Data object with the operating system?

(is the GUID in the registry?)

--
Regards,
tom Ogilvy

"Purnima" wrote in message
...
Hi,
When I try to programmatically add a reference to an ActiveX Data

object
Library I get an Application-defined or Object-defined error.

ThisWorkbook.VBProject.References.AddFromFile _
Filename:="C:\Program Files\Common Files\System\ado\msado21.dll"

This is where I get the error. I also tried this:

ThisWorkbook.VBProject.References.AddFromGuid _
GUID:="{ 00000205-0000-0010-8000-00AA006D2EA4 }", Major:=2, Minor:=5


But I still get the same error.
Can someone tell me why this is happening?

Thanx.






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
Error referencing linked dynamic range Basil Links and Linking in Excel 3 January 9th 10 01:48 PM
Referencing Error MikeChicago Excel Worksheet Functions 0 August 8th 08 12:06 AM
referencing a different tab by referencing a list in the current s Kevin Excel Worksheet Functions 3 July 6th 07 07:57 PM
Cell Referencing Code Error? MPS0525 Excel Worksheet Functions 0 August 17th 06 04:39 PM
#VALUE error when referencing spreadsheet on sharepoint library Lois Johns Excel Worksheet Functions 2 May 19th 05 05:38 PM


All times are GMT +1. The time now is 08:22 AM.

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"