G Guest Jul 31, 2004 #1 How do I prevent the warning message appearing when trying to alter a protected cell.
D Dave Peterson Jul 31, 2004 #2 You could have a macro that does the protecting--put it in your auto_open or workbook_open event: Option Explicit Sub auto_open() With Worksheets("sheet1") .Protect Password:="hi" .EnableSelection = xlUnlockedCells End With End Sub Excel won't remember this setting after you close it and reopen the workbook (that's why it's in auto_open).
You could have a macro that does the protecting--put it in your auto_open or workbook_open event: Option Explicit Sub auto_open() With Worksheets("sheet1") .Protect Password:="hi" .EnableSelection = xlUnlockedCells End With End Sub Excel won't remember this setting after you close it and reopen the workbook (that's why it's in auto_open).
G Guest Jul 31, 2004 #3 Thank you Dave but all I really want to do is stop the warning message. I do not want to alter the protected cell.
Thank you Dave but all I really want to do is stop the warning message. I do not want to alter the protected cell.
G Guest Jul 31, 2004 #4 Thank you, but all I want is to prevent the message. I do not really want to gain access to the cell.
Thank you, but all I want is to prevent the message. I do not really want to gain access to the cell.
G Guest Jul 31, 2004 #5 Thank you. All I really want is for the warning message to be cancelled. In other words if someone wants to change a protected cell, nothing happens I do not want to change the contents of a protected cell.
Thank you. All I really want is for the warning message to be cancelled. In other words if someone wants to change a protected cell, nothing happens I do not want to change the contents of a protected cell.
D Dave Peterson Jul 31, 2004 #6 You can't intercept this message, but you can stop the user from selecting a cell that could cause the message to pop up (if they tried to change it). This line: ..EnableSelection = xlUnlockedCells limits the cells the users can click on. Hence, the warning message won't appear. (This won't allow a user to change a locked cell on a protected worksheet.) == But as an aside, worksheet protection inside excel is very weak. From J.E. McGimpsey's site: http://www.mcgimpsey.com/excel/removepwords.html
You can't intercept this message, but you can stop the user from selecting a cell that could cause the message to pop up (if they tried to change it). This line: ..EnableSelection = xlUnlockedCells limits the cells the users can click on. Hence, the warning message won't appear. (This won't allow a user to change a locked cell on a protected worksheet.) == But as an aside, worksheet protection inside excel is very weak. From J.E. McGimpsey's site: http://www.mcgimpsey.com/excel/removepwords.html