Problem with protection of Sheet

divyaquamara

Board Regular
Joined
Jun 27, 2011
Messages
67
Hi,
I have a macro that extracts data from a summary sheet and places it several different reporting tempelates (having a fixed format).
There is also the current date which is placed on all the tempelates using a Now() function.
The macro runs well .
But I need to protect all worksheets in the workbook for content and structure so I used the following:
Code:
For Each ws In ActiveWorkbook.Worksheets
 ws.Protect Password:="dm12345", DrawingObjects:=True, Contents:=True, Scenarios:=True
Next ws
The above code protects all the data that has been extracted from summary sheet but does not protect the time stamp field in all the worksheets.
I need to protect those two cells as well.
How should I proceed.
Thanks in advance.
 

Excel Facts

Is there a shortcut key for strikethrough?
Ctrl+S is used for Save. Ctrl+5 is used for Strikethrough. Why Ctrl+5? When you use hashmarks to count |||| is 4, strike through to mean 5.
Thanks a lot that solves my problem.
But is there a way in which I can lock only cells "AW1 :AX2" (merged cells) in all the worksheets.
Thanks in advance
 
Upvote 0

Forum statistics

Threads
1,224,599
Messages
6,179,827
Members
452,946
Latest member
JoseDavid

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top