Home |
Search |
Today's Posts |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Private Sub Worksheet_Activate()
Me.Unprotect Password:="drowssap" 'do your stuff code Me.Protect Password:="drowssap" End Sub Gord Dibben MS Excel MVP On Thu, 15 Oct 2009 09:23:45 -0700, Drew wrote: I'm sure that this is very basic code, but I am a newby to VBA. Currently I have some code that is running that will update my pivot table when I click on the tab where the pivot table resides (Sales). However, when I protect this sheet, the code fails and I get an error. Can someone help me with the code that I need to unprotect the sheet prior to the code that runs the pivot table update and protect the sheet once the code is done running. Thanks, |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
macro to unlock and lock cells in password protected sheet | Excel Discussion (Misc queries) | |||
I FORGOT MY PASSWORD AND THE EXCEL SHEET IS LOCK HOW CAN I UNLOCK | Excel Discussion (Misc queries) | |||
i want to lock a tab in excel, and unlock in another sheet | Excel Programming | |||
Unlock/Lock VBProject through code? | Excel Programming | |||
Unlock/Lock VBProject through code? | Excel Programming |