View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
GS[_6_] GS[_6_] is offline
external usenet poster
 
Posts: 1,182
Default Retrieving records from closed Excel workbook

I need a simple way of retrieving records from a worksheet - with headers -
in a closed Excel workbook using SQL. But I also want VBA to detect the Excel
version and establish the proper connection (2007 and later).

Håkan


This would use ADODB and it doesn't matter which provider you use because both
VBA6/VBA7 support the JET/ACE engines.

FYI:
VBA7 is used in Excel 2010 and later;
VBA6 is used in Excel 2007 and earlier;

Here's a good primer on how to get started using ADODB with Excel files...

http://www.appspro.com/conference/Da...rogramming.zip

--
Garry

Free usenet access at http://www.eternal-september.org
Classic VB Users Regroup!
comp.lang.basic.visual.misc
microsoft.public.vb.general.discussion