View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
CLR CLR is offline
external usenet poster
 
Posts: 1,998
Default Trouble with Sheet Deactivate macro

Hi All......

I am trying to set up Worksheet Deactivate macro to
1-unprotect the sheet
2-clear contents of a specific range
3-hide the sheet

My present code:
Private Sub Worksheet_Deactivate()
ActiveSheet.Unprotect
Range("FieldCelleratorsX2").ClearContents
ActiveSheet.Visible = False
End Sub

It's unpredictable, sometimes it hides the sheet I'm GOING to, sometimes it
won't UNPROTECT.......the only part that seems to work consistantly is the
"clearcontents" line..........what an I doing wrong please?

TIA
Vaya con Dios,
Chuck, CABGx3