Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
I'm assuming that this code is behind Sheet2.
Private Sub WorkSheet_Change(ByVal Target As Range) with me .unprotect password:="TopSecret" .PivotTables(1).PivotCache.refresh .protect password:="TopSecret" end with End Sub Me refers to the object that owns the code--in this case, it's the worksheet being changed (and that has that pivottable). wrote: I have this code and without the sheet protection works good, but when i activate the sheet protection it shows me an error, the code is as follows: Private Sub WorkSheet_Change(ByVal Target As Range) Sheets("Sheet2").PivotTables(1).PivotCache.refresh End Sub is there an option to avoid this error? regards -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
PROTECT PIVOT TABLE | Excel Discussion (Misc queries) | |||
Protect part of pivot table | Excel Discussion (Misc queries) | |||
macro sheet name conflicts | Excel Worksheet Functions | |||
Pivot table with protect workbook | Excel Discussion (Misc queries) | |||
Sheet protection code conflicts with Pivot Table "auto refresh" | Excel Discussion (Misc queries) |