how do you break the link with MS Query - Database via code

  • Thread starter Thread starter JulieD
  • Start date Start date
J

JulieD

Hi

i have a spreadsheet that draws information from an access database and then
is "saved as" a new workbook - i would like to (programmatically) break the
link (ie untick save query definition) after the save as. I've done a
google search and found a post by Tom Ogilvy that mentions a code solution
but i couldn't find it anywhere.

if this is not possible any other "workarounds"?
Thanks.

Cheers
JulieD
 
Hi JulieD;

Right click somewhere in the returned range and select
Data Range Properties. You will find the options there to
turn it off.

Thanks,

Greg
 
Activesheet.QueryTables(1).Delete

will delete the querytable definition, but leave the data. It seems that is
what you want.
 

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

Back
Top