See Mr. Erlandsen's site for sample code:
http://www.erlandsendata.no/english/vba/adodao/
Other sources:
http://support.microsoft.com/?kbid=295646
HOWTO: Transfer Data from ADO Data Source to Excel with ADO
http://support.microsoft.com/?kbid=246335
HOWTO: Transfer Data from an ADO Recordset to Excel with Automation
http://support.microsoft.com/?kbid=257819
HOWTO: Use ADO with Excel Data from Visual Basic or VBA
For sample connection strings you can see Able-Computing
http://www.able-consulting.com/tech.htm
--
Regards,
Tom Ogilvy
"Juggernnath" wrote in message
...
I have huge database (MSAccess) and I tried to connect to database to
query
only few Records and to store them into a VBA macro variables. I used
MSaccess database from ASP before, so I tried to connect to a database in
similar way - unsuccessfully. Has anyone connected to mdb database and run
SQL query in that way. If did so, let me please show connection strings
etc.