#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default 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

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,593
Default 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



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default 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!


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default 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!


  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default 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!



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
If/Vlookup override Carolina Excel Worksheet Functions 4 August 9th 09 07:00 PM
Override a Formula John K. Excel Discussion (Misc queries) 4 February 12th 07 07:47 PM
Override No Zero Values ? Al Franz Excel Programming 1 May 19th 05 10:16 AM
Cell Value Override saschamps9903 Excel Discussion (Misc queries) 0 January 21st 05 09:53 PM
How do I override a deletion box? DMuehl Excel Programming 2 September 30th 04 02:19 PM


All times are GMT +1. The time now is 11:01 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"