I have the following VBA code which is failing with an "incomplete datasource" error on the last line:
The name of the ListObject is Table_Query_from_Excel_Files, and it is a table on the "Import" worksheet that pulls data from another workbook. The properties for the connection are as follows:
I have checked and the file referred to does exist, is in the right directory and has data. I didn't write this, but I need to maintain it and I'm not quite sure how to proceed to troubleshoot this code. Any help will be much appreciated!
Code:
Application.ScreenUpdating = False
Worksheets(Import).Select
Range("F10").Select
Selection.ListObject.QueryTable.Refresh BackgroundQuery:=False
The name of the ListObject is Table_Query_from_Excel_Files, and it is a table on the "Import" worksheet that pulls data from another workbook. The properties for the connection are as follows:
Code:
DSN=Excel Files;DBQ=\\wmssvcprd1\pf\BQ\College Point\PPP\PPP Capability\Programs.xlsx;DefaultDir=B:\;DriverId=1046;MaxBufferSize=2048;PageTimeout=5;
I have checked and the file referred to does exist, is in the right directory and has data. I didn't write this, but I need to maintain it and I'm not quite sure how to proceed to troubleshoot this code. Any help will be much appreciated!