Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TugboatEng on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Excel Query

Status
Not open for further replies.

Radagast

Mechanical
Joined
Jul 25, 2009
Messages
45
Location
US
I hope this has not been asked before. Red flag if it has, however;

MS Query

I have been asked to move data from one area of our servers to another. Not a problem with the database. The problem arrises when I update the excel spreadsheet pointing to the old location (Multiple query's). How do I change the file location the query's point to in Excel. Or can I?

I can move/copy the spreadsheet to any location on our server and it will always pull the data from the same place. I need that location changed.

Mike
 
Using Exel's native tools I think you would need to manually rebuild the query.

Using VBA you have access to the SourceDataFile Property

Something along the lines of:

worksheets(index).QueryTables(index).SourceDataFile = new path
 
I was quite sure that would be the case. I'll give VBA a shot first.

Thank you.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top