View Single Post
  #9   Report Post  
Posted to microsoft.public.excel.misc
Colin Hayes Colin Hayes is offline
external usenet poster
 
Posts: 465
Default Customising Standard Popups


Hi Dave

OK Thanks for that. It will work well.

I take your point about it being tiresome after a while. Although I
suppose it's only really taking the place of the standard excel pop-up.

The only difference is that the standard one is double-click , whereas
this one is on simple selection. Could it be made double-click , so that
it only pops up if the user insists? That would make it much less
wearisome and it would operate at the same frequency as the standard
one. Don't know if that's possible.

Thanks for your help with this.



In article , Dave Peterson
writes
Remove any code that you added to any of the worksheets.

Put this behind the ThisWorkbook module.

Option Explicit
Private Sub Workbook_SheetSelectionChange(ByVal Sh As Object, _
ByVal Target As Range)

If Sh.ProtectContents = True _
Or Sh.ProtectDrawingObjects = True _
Or Sh.ProtectScenarios = True Then
If Target.Cells(1).Locked = True Then
MsgBox "Sorry, the activecell cell is locked"
End If
End If

End Sub

===
Just my opinion--as a user, I would soon tire of this.


Colin Hayes wrote:

In article , Ron de Bruin
writes
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



Hi Ron

Yes , that would do it. Seems to be single click rather than double as
in the standard Excel popup.

Is there a way to apply it to the whole workbook at one go , or do I
need to put it in every worksheet separately , do you know?

Great stuff Ron - Thanks.