Try this...
Private Sub FixSource2()
Dim ws As Worksheet, As PivotTable, As PivotCache
' On Error Resume Next
With ActiveWorkbook
For Each ws In .Worksheets
ws.Unprotect Password:="password"
pt.PivotCache.MissingItemsLimit = xlMissingItemsNone
Next 'ws
For Each pc In .PivotCaches: pc.Refresh: Next 'pc
For Each ws In .Worksheets
ws.Protect DrawingObjects:=True, Contents:=True, _
Scenarios:=True, Password:="password"
Next 'ws
End With 'ActiveWorkbook
Application.Goto Sheets("Source").Range("B2")
End Sub
--
Garry
Free usenet access at
http://www.eternal-september.org
Classic
VB Users Regroup!
comp.lang.basic.visual.misc
microsoft.public.
vb.general.discussion