I've done a search but couldn't find anything relating to this issue.

Environment: SQL Server 2k/ Excel 2k

I'm new to VB so I apologize for using incorrect verbage and such. I have a workbook that contains 6 worksheets. Each worksheet has fairly similar codes that imports data via one single ODBC from one SQL db and then modifies the visual format. Just yesterday, one worksheet fails to refresh itself and there's no error code. Excel just stops responding and just crashes.

I've narrowed it down to the "Selection.QueryTable.refresh BackgroundQuery:=False" code because if I remove it, the macro proceeds as normal through the other worksheets. However, the "INVENTORY" worksheet is skipped altogether and does not refresh.

It's strange because the other worksheets use the "Selection.QueryTable.refresh BackgroundQuery:=False" as well and they appear to be running fine.



Please Login or Register  to view this content.
Any advice is greatly appreciated.