Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Error referencing linked dynamic range | Links and Linking in Excel | |||
Referencing Error | Excel Worksheet Functions | |||
referencing a different tab by referencing a list in the current s | Excel Worksheet Functions | |||
Cell Referencing Code Error? | Excel Worksheet Functions | |||
#VALUE error when referencing spreadsheet on sharepoint library | Excel Worksheet Functions |