![]() |
ADODB.Connection
Hi there,
Today I posted a question and I received an answer containing reference to ADODB.Connection. When I try to run the code, the following message occurs: "User-defined type not defined" And I have no clue how to fix it. Can anyone help me on this? Many thanks in advance, Bogdan |
ADODB.Connection
In the VBE select Tools - References - Microsoft ActiveX Data Objects
Recordset ?.? Library -- HTH... Jim Thomlinson "Bogdan" wrote: Hi there, Today I posted a question and I received an answer containing reference to ADODB.Connection. When I try to run the code, the following message occurs: "User-defined type not defined" And I have no clue how to fix it. Can anyone help me on this? Many thanks in advance, Bogdan |
ADODB.Connection
You need to add reference to your VBProject module. In the VBA IDE,
Tools-References. Look for something like "Microsoft ActiveX Data Objects 2.6 Library". The version number will depend on what's installed in your computer. "Bogdan" wrote: Hi there, Today I posted a question and I received an answer containing reference to ADODB.Connection. When I try to run the code, the following message occurs: "User-defined type not defined" And I have no clue how to fix it. Can anyone help me on this? Many thanks in advance, Bogdan |
ADODB.Connection
Using the same approach, I would have chosen
Microsoft ActiveX Data Objects 2.x Library (for me, the version was 2.8 - use the latest you have) which is the ADODB library Jim's recommendation is the ADOR library, so it would not have a definition for ADODB.Connection as requested. -- Regards, Tom Ogilvy "Bogdan" wrote: Hi there, Today I posted a question and I received an answer containing reference to ADODB.Connection. When I try to run the code, the following message occurs: "User-defined type not defined" And I have no clue how to fix it. Can anyone help me on this? Many thanks in advance, Bogdan |
ADODB.Connection
Hi Tom and thanks for your answer. Today I posted this question (maybe you
saw it): "Hi there, The facts: - I have a folder with 50-60 files, each file having more than 10 sheets; - the files are pretty big (some of them 40mb+) and are linked to many other files from various locations from the network; What I would like to do is: - to verify whether all files are comprising a sheet named for example "Abc"; The code currently used by me is doing this check, but it is necessary to open each file from the respective folder. The issue is that due to big number of files, size and links, the execution of this code takes few hours. Thus, my code is useless. The question: is it possible to make this test without opening the files?" I kindly ask you for help me on this, because I cannot figure out how to do it. Someone suggested me to use ADO, but... Many thanks in advance, Bogdan "Tom Ogilvy" wrote: Using the same approach, I would have chosen Microsoft ActiveX Data Objects 2.x Library (for me, the version was 2.8 - use the latest you have) which is the ADODB library Jim's recommendation is the ADOR library, so it would not have a definition for ADODB.Connection as requested. -- Regards, Tom Ogilvy "Bogdan" wrote: Hi there, Today I posted a question and I received an answer containing reference to ADODB.Connection. When I try to run the code, the following message occurs: "User-defined type not defined" And I have no clue how to fix it. Can anyone help me on this? Many thanks in advance, Bogdan |
ADODB.Connection
You are absolutely correct. I was going from memory which is not all it is
cracked up to be. That being said I normally choose 2.5 or 2.7 (now that I actually take a look at the list) as it has all of the functionallity and tends to be more backwards compatible with lesser versions of XL. IIRC 2.8 only came into being with service Pack 2 (?) of XL 2000 and as a result there are still a bunch of users who may not have it. But I think 2.8 was a security patch (I think) so if all of your users have it then use it... -- HTH... Jim Thomlinson "Tom Ogilvy" wrote: Using the same approach, I would have chosen Microsoft ActiveX Data Objects 2.x Library (for me, the version was 2.8 - use the latest you have) which is the ADODB library Jim's recommendation is the ADOR library, so it would not have a definition for ADODB.Connection as requested. -- Regards, Tom Ogilvy "Bogdan" wrote: Hi there, Today I posted a question and I received an answer containing reference to ADODB.Connection. When I try to run the code, the following message occurs: "User-defined type not defined" And I have no clue how to fix it. Can anyone help me on this? Many thanks in advance, Bogdan |
ADODB.Connection
This solution worked very well for me.
But (and you knew there had to be one), how do I make sure each of my users has these objects checked? -- Adios, Clay Harryman "Tom Ogilvy" wrote: Using the same approach, I would have chosen Microsoft ActiveX Data Objects 2.x Library (for me, the version was 2.8 - use the latest you have) which is the ADODB library Jim's recommendation is the ADOR library, so it would not have a definition for ADODB.Connection as requested. -- Regards, Tom Ogilvy "Bogdan" wrote: Hi there, Today I posted a question and I received an answer containing reference to ADODB.Connection. When I try to run the code, the following message occurs: "User-defined type not defined" And I have no clue how to fix it. Can anyone help me on this? Many thanks in advance, Bogdan |
All times are GMT +1. The time now is 10:29 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com