View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.misc
Ron de Bruin Ron de Bruin is offline
external usenet poster
 
Posts: 11,123
Default Customising Standard Popups

You can try this event in the sheet module

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Locked = True Then MsgBox "Sorry this cell is locked"
End Sub


--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"Colin Hayes" wrote in message ...

Hi Dave

OK thanks. I did think of that , but it doesn't help me because they
complain then that they can't select the cell...!

I do need a popup each time a protected cell is selected saying ' You
can't change this cell , and don't need to access it' , rather than
saying ' go and dig around in the options panel for a password..'

Not sure it's possible.

Thanks again.





In article , Dave Peterson
writes
Maybe you could stop the users from selecting a locked cell on a protected
worksheet.

If all your users are using xl2002+, then there's an option in the
Tools|Protection|protect sheet dialog that allows you to specify if the user can
select unlocked cells.

If you're using xl2k or below, you'd need a macro:

Sub Auto_Open()
With Worksheets("Sheet99999")
.Unprotect Password:="hi"
.EnableSelection = xlUnlockedCells
.Protect Password:="hi", DrawingObjects:=True, _
Contents:=True, Scenarios:=True
End With
End Sub

In fact, in xl2k and below, this setting isn't remembered when you close the
workbook and reopened. Setting it in code was the only way to do this.

Colin Hayes wrote:

HI

This may be an impossible thing to do....

When I try to access a protected cell , I am given the standard Excel
popup saying that it is protected and that I can modify it by putting a
password in via the tools menu.

I do realise that the text in the popup can't be changed , but I was
wondering if the popup itself could be replaced with a message box or
validation popup whenever access to a protected cell is attempted?

Perhaps a small macro applying to all the protected parts for the sheets
could be triggered to replace the standard popup with a new one with a
customised message. (One that doesn't suggest users go digging around
trying to unprotect cells...)

Grateful for any help.