View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Dave Peterson Dave Peterson is offline
external usenet poster
 
Posts: 35,218
Default worksheet protection?

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