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