View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.programming
Gordon Humphreys Gordon Humphreys is offline
external usenet poster
 
Posts: 4
Default Refresh Pivot Tables

My thanks to Ogilvy et al.
This seems to work fine - select any pivot table first [the separate protect
macros are to keep the password hidden in only one place]

Sub PtRefresher()
Application.Run Range("Unprotecter"
ActiveSheet.EnablePivottable=True
ActiveSheet.Pivottables(1).RefreshTable
MsgBox "Pivot Table Refreshed"
Application.RunRange("Protecter")
End Sub

However, it don't work if a derived PT is on a nearby locked sheet. Is
there any way round? I have recently decided to avoid derived sheets and
always start from scratch: is this the only way?

Is there any way of pasting stuff into these handy messages, for slow typists?