View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Dave Peterson[_5_] Dave Peterson[_5_] is offline
external usenet poster
 
Posts: 1,758
Default Intercept protection message

Maybe you could just stop the user from selecting a locked cell.

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

I'm not sure what message you're seeing from the workbook protection, though.

Jim at Eagle wrote:

I would like to intercept the worksheet or workbook protection message and
run code to handle someone trying to change a protected worksheet. Is this
possible? Thanks
--
Jim at Eagle


--

Dave Peterson