View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Helen0610 Helen0610 is offline
external usenet poster
 
Posts: 2
Default Un Protect in Excel 2000

I am trying to do the blow but it keeps coming up with run time errot 1004. I
am new at this and very confused. I need it to run utomatically at the click
of a button, any ideas?

Private Sub CommandButton1_Click()

' ActiveSheet.Unprotect "helen"

Range("C4:C7,H4:H7,C11:C14,H11:H14,C18:C21,G18:H21 ,C25:C28,H25:H28,I25:J28,C32:J34,N28,M29:P32,O21:O 22,F1:I1").Select
Range("F1").Activate
Selection.ClearContents
Range("C4").Select
ActiveSheet.Protect
Range("a1").Select
ActiveCell.FormulaR1C1 = "Select Contract Length"
ActiveSheet.Protect "helen"

End Sub

Cheers

Helen