Using Excel and Query--copy workbook

N

natei6

Hello to All,

I'm using Query to pull a parts list to sheet 2 from sheet 1. Thi
works fine until I make a copy of the workbook. When I make a copy o
the workbook, the Query still draws from the original. Is there a wa
to easily change the query to pull from the copy instead of th
original?

Thanks for any help

Nathan Sargean
 
K

K Dales

Two options:
1) In MSQuery, File menu is option "Table Definition" that
allows you to respecify your data source.

2) From VBA code, the QueryTable object has a Connection
property that specifies the data source - you could change
this via VBA.

K Dales
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top