Posted to microsoft.public.excel.programming
|
|
worksheet protection?
You are right, sir!
Tom Ogilvy wrote:
Excel won't remember these settings after you close it and reopen the
workbook
That isn't the case for xl2002 and xl2003 if it is set manually and reopen
it in those versions. This setting will be maintained across opening and
closing the workbook in that case.
However, if you don't use those or your users have earlier versions, then
that would be problematic and you would need to use code.
The problem is that if you use code, the user can disable macros and the
code won't enforce the protection setting.
--
Regards,
Tom Ogilvy
"Dave Peterson" wrote in message
...
You can do it by protecting the worksheet in code:
Option Explicit
Sub auto_open()
With Worksheets("sheet1")
.Protect Password:="hi"
.EnableSelection = xlUnlockedCells
End With
End Sub
Excel won't remember these settings after you close it and reopen the
workbook
(that's why it's in auto_open).
If you're new to macros, you may want to read David McRitchie's intro at:
http://www.mvps.org/dmcritchie/excel/getstarted.htm
dr chuck wrote:
I have a worksheet that i have protected with the "select locked cells"
button unchecked. When i close excel and reopen it the worksheet is still
protected but the "select locked cells" button is checked again. This
allows
locked cells to be selected.
I want to prevent locked cells from being selected every time i open the
worksheet?
suggestions?
--
dr chuck
--
Dave Peterson
--
Dave Peterson
|