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 Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Removing external queries from spreadsheet

Status
Not open for further replies.

BajanPOET

Programmer
Jul 12, 2002
194
BB
I'm still trying to get the external queries to work in the background without asking the user if they want to enable or disable automatic refresh.

I want the user to save the purchase order as a new file, but I don't want the new file to open and keep asking if the refresh should be enable or disabled. Nothing I've tried so far has worked - the external queries were not set to refresh automatically at first - I was trying to get them to refresh using the Windows_Open procedure, but I couldn't get it to work.

What I would like to try is removing the external queries programatically when after the file is saved with its unique name. Is there a way that I can delete the named ranges and their underlying external queries without destroying the data - as in, if I have already used the query to give me data x, y and z, can I then delete the named reference and keep x, y and z on the spreadsheet and save it so that when I reopen the data is still there?

What? Who? ME????
 



Hi,

This is not an MS Access VBA question.

Please post in VBA Visual Basic for Applications (Microsoft) forum707

In the mean time, check out the properties & methods for the QueryTable Object.

Skip,

[glasses] [red][/red]
[tongue]
 
shoot ... chose the wrong forum...

Thanks, Skip

What? Who? ME????
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top