I am trying to reset/ClearContents within a Range of Cells.
I used Name Manager and Defined the following code & named it "ProdTally120":
Code:
='PROD TALLY'!C15:C24,'PROD TALLY'!C27:C36,'PROD TALLY'!C39:C48,'PROD TALLY'!G15:G24,'PROD TALLY'!G27:G36,'PROD TALLY'!G39:G48,'PROD TALLY'!K15:K24,'PROD TALLY'!K27:K36,'PROD TALLY'!K39:K48,'PROD TALLY'!O15:O24,'PROD TALLY'!O27:O36,'PROD TALLY'!O39:O48
I used Name Manager and Defined the following code & named it "ProdTally240":
Code:
='PROD TALLY'!C51:C60,'PROD TALLY'!C63:C72,'PROD TALLY'!C75:C84,'PROD TALLY'!G51:G60,'PROD TALLY'!G63:G72,'PROD TALLY'!G75:G84,'PROD TALLY'!K51:K60,'PROD TALLY'!K63:K72,'PROD TALLY'!K75:K84,'PROD TALLY'!O51:O60,'PROD TALLY'!O63:O72,'PROD TALLY'!O75:O84
I used Name Manager and Defined the following code & named it "ProdTally360":
Code:
='PROD TALLY'!C87:C96,'PROD TALLY'!C99:C108,'PROD TALLY'!C111:C120,'PROD TALLY'!G87:G96,'PROD TALLY'!G99:G108,'PROD TALLY'!G111:G120,'PROD TALLY'!K87:K96,'PROD TALLY'!K99:K108,'PROD TALLY'!K111:K120,'PROD TALLY'!O87:O96,'PROD TALLY'!O99:O108,'PROD TALLY'!O111:O120
I then Added an ActiveButton with the following Code:
Code:
Private Sub Reset_Click()
ActiveSheet.Unprotect ("PASSWORD")
Range("ProdTally120").ClearContents
Range("ProdTally240").ClearContents
Range("ProdTally360").ClearContents
ActiveSheet.Protect ("PASSWORD")
End Sub
When I click the Reset Button I get an error message that says:
Code:
Run-time Error '1004':
Cannot change part of a merged cell
I don't understand!
Any ideas!