Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 167
Default Error Handling an attempt to change a protected cell

I have a sheet with several protected sections. If an attempt is made to
change a protected cell the generic error box comes up notifying the user
that the workbook is protected. I would like to display my own dialog box
when a user tries to change a protected cell. Can this be done? How?

Thanks in advance for the help.

Mike
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 156
Default Error Handling an attempt to change a protected cell

try something like this:

CODE
If ActiveSheet.ProtectContents = False Then
' allow user actions
End
Else
MsgBox "Please unprotect the sheet before changing cells", vbCritical +
vbOKCancel, "Entry Error"
exit sub
End If
<<<< END CODE

HTH

Philip
"crazybass2" wrote:

I have a sheet with several protected sections. If an attempt is made to
change a protected cell the generic error box comes up notifying the user
that the workbook is protected. I would like to display my own dialog box
when a user tries to change a protected cell. Can this be done? How?

Thanks in advance for the help.

Mike

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
Protected sheet - attempt to delete row = unmerged cells Kaz Excel Discussion (Misc queries) 5 October 29th 09 05:28 PM
handling calculated excel cell error messages RK Excel Discussion (Misc queries) 2 October 22nd 07 01:05 PM
error in attempt to warn about macro security Pierre via OfficeKB.com[_2_] Excel Programming 6 November 2nd 05 07:14 PM
need an error msge when I attempt to enter a duplicate value in a pg23673 Excel Discussion (Misc queries) 5 June 13th 05 12:07 PM
Error handling with a handling routine ben Excel Programming 0 March 15th 05 03:01 PM


All times are GMT +1. The time now is 02:07 PM.

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"