![]() |
Buttons and Sheet Protection?
Greetings! Have a worksheet with a button and event code. When the sheet
is unprotected, the button and code work fine. When the sheet is protected, and some cells are selected to be locked but the one with the button is not, the button doesn't work. There is a host of options for sheet protection, allowing the user to change this, that, and the other while the sheet is protected, but none of them seem directly related to this. What would be interfering with button operation, and/or how can it be enabled on the protected sheet? Thanks, George |
Buttons and Sheet Protection?
I don't think that protecting the sheet will stop the button from being
clicked but it may prevent the associated event from performing some actions. What is the event code doing? Regards Rowan G Lykos wrote: Greetings! Have a worksheet with a button and event code. When the sheet is unprotected, the button and code work fine. When the sheet is protected, and some cells are selected to be locked but the one with the button is not, the button doesn't work. There is a host of options for sheet protection, allowing the user to change this, that, and the other while the sheet is protected, but none of them seem directly related to this. What would be interfering with button operation, and/or how can it be enabled on the protected sheet? Thanks, George |
Buttons and Sheet Protection?
unprotect the sheet and check the code to see if it's in debug mode
-- Gary "G Lykos" wrote in message ... Greetings! Have a worksheet with a button and event code. When the sheet is unprotected, the button and code work fine. When the sheet is protected, and some cells are selected to be locked but the one with the button is not, the button doesn't work. There is a host of options for sheet protection, allowing the user to change this, that, and the other while the sheet is protected, but none of them seem directly related to this. What would be interfering with button operation, and/or how can it be enabled on the protected sheet? Thanks, George |
Buttons and Sheet Protection?
Rowan, the code never gets to run.
When the sheet is unprotected and I pass the cursor over the cell containing the two buttons, it forms a hollow cross when over open space and becomes a hand+finger when over the button, allowing the button to be pressed and causing the code to run. When the sheet is protected, the cursor remains a hand+finger everywhere in the cell, and the buttons do not respond to a click. Ideas? Thanks, George "Rowan Drummond" wrote in message ... I don't think that protecting the sheet will stop the button from being clicked but it may prevent the associated event from performing some actions. What is the event code doing? Regards Rowan G Lykos wrote: Greetings! Have a worksheet with a button and event code. When the sheet is unprotected, the button and code work fine. When the sheet is protected, and some cells are selected to be locked but the one with the button is not, the button doesn't work. There is a host of options for sheet protection, allowing the user to change this, that, and the other while the sheet is protected, but none of them seem directly related to this. What would be interfering with button operation, and/or how can it be enabled on the protected sheet? Thanks, George |
Buttons and Sheet Protection?
Gary, checked, and it does not appear to be in debug mode. Other ideas?
Thanks, George "Gary Keramidas" <GKeramidasATmsn.com wrote in message ... unprotect the sheet and check the code to see if it's in debug mode -- Gary "G Lykos" wrote in message ... Greetings! Have a worksheet with a button and event code. When the sheet is unprotected, the button and code work fine. When the sheet is protected, and some cells are selected to be locked but the one with the button is not, the button doesn't work. There is a host of options for sheet protection, allowing the user to change this, that, and the other while the sheet is protected, but none of them seem directly related to this. What would be interfering with button operation, and/or how can it be enabled on the protected sheet? Thanks, George |
Buttons and Sheet Protection?
are you in design mode? click the control toolbox on and click the design
icon off -- Gary "G Lykos" wrote in message ... Rowan, the code never gets to run. When the sheet is unprotected and I pass the cursor over the cell containing the two buttons, it forms a hollow cross when over open space and becomes a hand+finger when over the button, allowing the button to be pressed and causing the code to run. When the sheet is protected, the cursor remains a hand+finger everywhere in the cell, and the buttons do not respond to a click. Ideas? Thanks, George "Rowan Drummond" wrote in message ... I don't think that protecting the sheet will stop the button from being clicked but it may prevent the associated event from performing some actions. What is the event code doing? Regards Rowan G Lykos wrote: Greetings! Have a worksheet with a button and event code. When the sheet is unprotected, the button and code work fine. When the sheet is protected, and some cells are selected to be locked but the one with the button is not, the button doesn't work. There is a host of options for sheet protection, allowing the user to change this, that, and the other while the sheet is protected, but none of them seem directly related to this. What would be interfering with button operation, and/or how can it be enabled on the protected sheet? Thanks, George |
Buttons and Sheet Protection?
If the code run by the button tries to change a protected cell, the
protection interrupts the code. Try inserting these 2 lines into your code, one at the beginning, the other at the end. ActiveSheet.Unprotect <Your Code ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True "G Lykos" wrote in message ... Greetings! Have a worksheet with a button and event code. When the sheet is unprotected, the button and code work fine. When the sheet is protected, and some cells are selected to be locked but the one with the button is not, the button doesn't work. There is a host of options for sheet protection, allowing the user to change this, that, and the other while the sheet is protected, but none of them seem directly related to this. What would be interfering with button operation, and/or how can it be enabled on the protected sheet? Thanks, George |
Buttons and Sheet Protection?
Dave, thanks for the suggestion - a solution ended up being down this path.
Specific steps to remedy the problem: unlock the cell where the buttons are located, and .Protect Contents:=False at opening to initialize. Don't understand the intuitive logic of the latter, but it works. Regards, George "Dave" wrote in message ... If the code run by the button tries to change a protected cell, the protection interrupts the code. Try inserting these 2 lines into your code, one at the beginning, the other at the end. ActiveSheet.Unprotect <Your Code ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True "G Lykos" wrote in message ... Greetings! Have a worksheet with a button and event code. When the sheet is unprotected, the button and code work fine. When the sheet is protected, and some cells are selected to be locked but the one with the button is not, the button doesn't work. There is a host of options for sheet protection, allowing the user to change this, that, and the other while the sheet is protected, but none of them seem directly related to this. What would be interfering with button operation, and/or how can it be enabled on the protected sheet? Thanks, George |
All times are GMT +1. The time now is 02:07 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com