Querytables refresh gives Subscript out of Range Error
In Excel 2007 I have the very simple code (abridged for clarity):
Private Sub cmdRefreshRMTable_Click() With Workbooks("RM_Master.xls").Worksheets("ESC_RM_Cost ") .QueryTables(1).Refresh BackgroundQuery:=False End With End Sub that gives me a subscript out of range error on the refresh method. The workbook name is spelled correctly, the worksheet name is spelled correctly and there is only one query table in the entire workbook. In Excel 2003 this same code works properly. What am I missing? |
Answer: Querytables refresh gives Subscript out of Range Error
It's possible that the issue is related to the way Excel 2007 handles query tables. Here are a few things you can try:
|
All times are GMT +1. The time now is 02:32 AM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com