Command Button returning runtime error 1004

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have developed a workbook which contains multiple worksheets. Within each
worksheet I have added security with the exception to certain cells. To do
this I selected the cells and within security I unchecked the "locked" box; I
then protected the sheet.
On one page I have a command button that is coded to clear all of those
unlocked cells. An example of the code would be as follows:
Worksheets("Book").Range("C4:C10,C12:C13,C16").ClearContents
Each individual sheet contains this same range code within a command button.
My Problem is that the command button on my Table of Contents page with the
above code gives me a runtime error #1004.
Can someone help me keep the security in place but allow this button to run...
Thank you so much for your help in Advance...
Ed Prill
 
hi,
See your other post
regards
Frank
-----Original Message-----
I have developed a workbook which contains multiple worksheets. Within each
worksheet I have added security with the exception to certain cells. To do
this I selected the cells and within security I unchecked the "locked" box; I
then protected the sheet.
On one page I have a command button that is coded to clear all of those
unlocked cells. An example of the code would be as follows:
("C4:C10,C12:C13,C16").ClearContents
Each individual sheet contains this same range code within a command button.
My Problem is that the command button on my Table of Contents page with the
above code gives me a runtime error #1004.
Can someone help me keep the security in place but allow this button to run...
Thank you so much for your help in Advance...
Ed Prill
.
 
Back
Top