View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Peter T[_7_] Peter T[_7_] is offline
external usenet poster
 
Posts: 162
Default Retrieving records from closed Excel workbook

"GS" wrote in message

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;


Just to add, although VBA6 / VBA7 is not related to this, unless need to
support 2003 for later versions probably better to use the ACE engine which
is normally available in all 32/64 bit systems, unlike JET which is less
likely to be particularly x64.

If in doubt use something like

If Val(Application.Version) <= 11 Then ' 2003 or earlier
sPovider = "Provider=Microsoft.Jet.OLEDB.4.0;"
Else
sPovider = "Provider=Microsoft.ACE.OLEDB.12.0;"
End If


Peter T