View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Drew Drew is offline
external usenet poster
 
Posts: 13
Default Code to Lock and Unlock a sheet

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,
--
Drew