ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Query Refresh (https://www.excelbanter.com/excel-discussion-misc-queries/168730-query-refresh.html)

chas

Query Refresh
 
I currently have a workbook that has several Query Tables in it. I currently
have a macro to "refreshall" but my problem is that occasionally the file
name may change causing an error in the refresh process. Is there a way to
include a procedure in code that if the filename in the query no longer
exist, it could prompt for the correct filename? In my existing macro I have
a section for inserting new queries & it prompts for the filename but I'm not
sure how to code on a refresh error to prompt for a filename.

Any help would be greatly appreciated.

Don Guillett

Query Refresh
 
Maybe instead of refresh all refresh each in turn with an on error goto

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"Chas" wrote in message
...
I currently have a workbook that has several Query Tables in it. I
currently
have a macro to "refreshall" but my problem is that occasionally the file
name may change causing an error in the refresh process. Is there a way
to
include a procedure in code that if the filename in the query no longer
exist, it could prompt for the correct filename? In my existing macro I
have
a section for inserting new queries & it prompts for the filename but I'm
not
sure how to code on a refresh error to prompt for a filename.

Any help would be greatly appreciated.




All times are GMT +1. The time now is 08:29 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com