Hi Aga,
Have you followed Ole's instructions:
'------------------------
The macro example assumes that your VBA project has added a reference
to the ADO object library.
You can do this from within the VBE by selecting the menu Tools,
References and selecting Microsoft ActiveX Data Objects x.x Object Library.
Use ADO if you can choose between ADO and DAO for data import or
export.
'------------------------
---
Regards,
Norman
"aga2957" wrote in
message ...
Hi!
I used the "Use a closed workbook as a database (ADO)" for the project
that I'm doing but it returned an error.
I have inputted the code on one of my modules and a button will call
the procedure.
Once I click on the button it says 'User-define type not defined for
"cn As ADODB.Connection".
Can you tell how should I do this in VBA since I'm using excel? Thanks!
--
aga2957
------------------------------------------------------------------------
aga2957's Profile:
http://www.excelforum.com/member.php...o&userid=25346
View this thread: http://www.excelforum.com/showthread...hreadid=571705