Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
QueryTable Refresh Failed
I have an Excel vba module that loops through (several thousand) records in a
worksheet, and for each record performs a query (using Microsoft Query) to an Access database; returning the query results to a QueryTable object in another worksheet of the same Excel workbook. After the QueryTable.CommandText statement, I have a QueryTable.Refresh BackgroundQuery:=False statement. My problem is that occasionally I receive the following error message: Method 'Refresh' of object '_QueryTable' failed I can restart the module at the record where it failed previously, and it runs again correctly,for awhile, until it the Refresh method gives the same error again. Sometimes the module will correctly process the (same) entire set of records, without this error message; and sometimes not. I'm using Microsoft Office Professional Edition 2003; so this has Microsoft Office Excel 2003 SP2 and Microsoft Office Access 2003 SP2. Does anyone have any idea what can cause this behavior, or how I can prevent the error from occuring, or how I can programatically recover from the error? Thanks very much! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
QueryTable Last Refresh Date? | Excel Programming | |||
Update querytable connections and refresh data | Excel Programming | |||
Querytable and pivot table refresh problem | Excel Programming | |||
I need a QueryTable.Refresh solution | Excel Programming | |||
catching cancel on QueryTable.Refresh | Excel Programming |