LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Keep the Enable Refresh option (VBA, SQL)

Paul,

I haven't seen any response to your request so I found the followin
code in Google. It appears to be what you ar looking for you may hav
to modify it. If this helps the credit goes to the ones who create
it.

HTH
Charles



Sub RefreshTables()
vArr = Array( _
"M:\Data Dir\Project1\MyProject1.xls", _
"M:\Data Dir\Project1\MyProject2.xls", _
"M:\Other Dir\Invoices\MyInvoice.xls", _
"P:\Shared1\SubDir1\SubDir2\Myworbkook.xls")
for i = 1 to ubound(vArr)
set wkbk = Workbooks.Open varr(i)
for each sh in wkbk.Worksheets
for each pt in sh.PivotTables
pt.PivotCache.BackgroundQuery = False
Next
Next
wkbk.RefreshAll
wkbk.Close SaveChanges:=True
Next
End Su

--
Message posted from http://www.ExcelForum.com

 
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 can I 'Enable Automatic Refresh' for Query Refresh by default Anand Deshpande Setting up and Configuration of Excel 0 December 10th 06 04:47 AM
'Enable Automatic Refresh?' Nigel Brown Setting up and Configuration of Excel 0 June 27th 06 05:22 PM
enable automatic refresh Vass Excel Worksheet Functions 2 March 11th 06 04:36 AM
Enable Automatic Refresh Terri Excel Worksheet Functions 1 August 8th 05 11:26 PM
Query Refresh-Enable Automatic Refresh Dialogue Box Terri Excel Discussion (Misc queries) 0 May 6th 05 08:21 PM


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

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

About Us

"It's about Microsoft Excel"