View Single Post
  #4   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

"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


Yes, that's how I have my wrapper coded. This is outlined in Rob's doc that
accompanies the samples in the link I provided.

--
Garry

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