Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 44
Default Disable all "Refresh Data on File open"

Dear all,

I have an excel workbook with 3 sheets,

And in sheet there are more than 5 queries.

When my start macro, it saves the workbook in a new file name.

And in this position, I want to disable all queris. The queries can be
deleted, the "refresh data on file open" can be diabled... Whatever the
solution is, I don't want to see any info box about enabling or disabling the
queries when i open the new file.

Can you please help me?

Kindest regards,


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 718
Default Disable all "Refresh Data on File open"

Sub ClearAllQueries()
Dim ws As Worksheet
Dim qt As QueryTable

For Each ws In ActiveWorkbook.Worksheets
For Each qt In ws.QueryTables
qt.Delete
Next qt
Next ws
End Sub

HTH
--
AP

"SupperDuck" a écrit dans le message
de news: ...
Dear all,

I have an excel workbook with 3 sheets,

And in sheet there are more than 5 queries.

When my start macro, it saves the workbook in a new file name.

And in this position, I want to disable all queris. The queries can be
deleted, the "refresh data on file open" can be diabled... Whatever the
solution is, I don't want to see any info box about enabling or disabling
the
queries when i open the new file.

Can you please help me?

Kindest regards,




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 44
Default Disable all "Refresh Data on File open"

Dear Ardus,

That works great!!

Thank you...

"Ardus Petus" wrote:

Sub ClearAllQueries()
Dim ws As Worksheet
Dim qt As QueryTable

For Each ws In ActiveWorkbook.Worksheets
For Each qt In ws.QueryTables
qt.Delete
Next qt
Next ws
End Sub

HTH
--
AP

"SupperDuck" a écrit dans le message
de news: ...
Dear all,

I have an excel workbook with 3 sheets,

And in sheet there are more than 5 queries.

When my start macro, it saves the workbook in a new file name.

And in this position, I want to disable all queris. The queries can be
deleted, the "refresh data on file open" can be diabled... Whatever the
solution is, I don't want to see any info box about enabling or disabling
the
queries when i open the new file.

Can you please help me?

Kindest regards,





Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I stop the popup "Enable/Disable Automatic Refresh"? RiverGuy Excel Discussion (Misc queries) 0 May 10th 09 03:38 PM
Unable to open a 82 KB XLSM file due to "Too many different cellformats" & "Converter failed to open the file." errors. Phillip Pi Excel Discussion (Misc queries) 0 April 23rd 09 08:53 PM
Unable to open a 82 KB XLSM file due to "Too many different cellformats" & "Converter failed to open the file." errors. Phillip Pi Setting up and Configuration of Excel 0 April 23rd 09 08:53 PM
Automatic "data refresh" when XLS file is opened? L. Berger Excel Discussion (Misc queries) 1 June 20th 07 01:14 PM
Suppress "Disable/Enable Macros" and Query Refresh dialog on open Sharon Excel Programming 2 January 18th 06 09:20 PM


All times are GMT +1. The time now is 02:43 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"