"Catastrophic Failure" error using ADO to query Excel Workbook...

P

Philip

Hi,

I am using ADO and OLE DB to read an Excel range from a closed workbook into
a recordset that I then dump into my worksheet using the CopyFromRecordset
method.

This is similar to the methods explained on Ron De Bruins site
(http://www.rondebruin.nl/ado.htm) - and even his samples do not work on my
Windows XP / Office 2003 machine.

Strangely enough, Rons samples work fine on my Windows 2K machine with
office 2003.

But on my main dev machine (Win XP / Office 2003) I get this "catastrophic
failure" error.

Is there some change in the drivers between Windows 2000 and Windows XP that
prevents this working - and how do I get it to work? Should I reinstall the
latest MDAC?

thanks for any help

Philip
 
R

Ron de Bruin

Hi Philip

Must work OK

Do you have any missing references in the VBA editor

Alt F11
Tools>References
 
P

Philip

Hi,

I re-registered 'C:\WINDOWS\System32\msexcl40.dll' in the registery Editor
and now at least your examples work, so I am hopeful that was the problem ...

and so far it seems to work with my CSV and MS Excel ones too (I have
outrageous UNION and GROUP BY queries against multiple worksheets in multiple
workbooks and csv files going on ... I won't ruin your day with the details!)

I got the solution after seeing another error message about 'Could not find
installable ISAM'

so thanks anyway !

Philip
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top