×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Excel Query

Excel Query

Excel Query

(OP)
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

RE: Excel Query

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

RE: Excel Query

(OP)
I was quite sure that would be the case. I'll give VBA a shot first.

Thank you.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources