![]() |
Override
Hi
I have a workbook that is protected. When someone tried to change the content of the workbook the generic error message "The cell or chart you are trying to change is protected and therefore read-only". Is it possible to replace that message with a customised message box? If so anyone please advice me how to do this? Thank you very much in advance. Peddie |
Override
You could add a worksheet change event, trap any changes, and if the sheet
is protected throw up a custom MsgBox. But you will probably still get the other one , and so it hardly seems worth the effort to me -- HTH Bob Phillips (replace somewhere in email address with gmail if mailing direct) "peddie" wrote in message oups.com... Hi I have a workbook that is protected. When someone tried to change the content of the workbook the generic error message "The cell or chart you are trying to change is protected and therefore read-only". Is it possible to replace that message with a customised message box? If so anyone please advice me how to do this? Thank you very much in advance. Peddie |
Override
"Geoff Harrison" wrote:
Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range) If Worksheets("Sheet1").Protect = True Then MsgBox "Protected" End If End Sub Actually, reviewing what I've just posted ... ignore this section ... makes no difference. -- Quacking Eck! It''s The Duck! |
Override
Thanks Geoff
I didnt try it yet but are you saying that it is not doable to override this message box then? Many thanks for your effort. Peddie Geoff Harrison wrote: "Geoff Harrison" wrote: Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range) If Worksheets("Sheet1").Protect = True Then MsgBox "Protected" End If End Sub Actually, reviewing what I've just posted ... ignore this section ... makes no difference. -- Quacking Eck! It''s The Duck! |
Override
You can still use this solution ... just ignore the bit about the
Workbook_SheetChange sub ... it doesn't have any effect. -- Quacking Eck! It''s The Duck! "peddie" wrote: Thanks Geoff I didnt try it yet but are you saying that it is not doable to override this message box then? Many thanks for your effort. Peddie Geoff Harrison wrote: "Geoff Harrison" wrote: Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range) If Worksheets("Sheet1").Protect = True Then MsgBox "Protected" End If End Sub Actually, reviewing what I've just posted ... ignore this section ... makes no difference. -- Quacking Eck! It''s The Duck! |
All times are GMT +1. The time now is 08:29 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com