F
Fid
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?
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?