Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Protection lost on Open
It is my intention to disable users from selecting any cells on
worksheet that I have just created in a workbook using EXCEL 2002. New to VB, I rely greatly on recording macros then cut/paste. In this case I did a Ctl+A to select all cells, then FormatCells - Protection, checked Locked & Hidden and then "OK". Then I went to ToolsProtectionProtect Sheet. With the exception of "Protect worksheet and contents of locked cells" all boxes were unchecked when I hit "OK". The following code was generated: Cells.Select Range("C3").Activate Selection.Locked = True Selection.FormulaHidden = True ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True Cells.Select Range("C3").Activate If I then unprotect the worksheet and run the macro, as intended, all cells are not selectable. The problem I have is that if the workbook is closed and reopened, cells are once again selectable and can be copied. Is there a programmable solution for retaining the protection as implemented? Thanks, GCF --- Message posted from http://www.ExcelForum.com/ |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Lost Protection Password | Excel Discussion (Misc queries) | |||
Password protection lost | Excel Discussion (Misc queries) | |||
Password protection lost | New Users to Excel | |||
Cell protection in Excel is lost when file is uploaded to website. | Excel Discussion (Misc queries) |