Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Disbale button when worksheet protected
Is there any way of disabling a button on a worksheet when the worksheet is
protected, i.e. I do not want people to click the button to refresh the data if the sheet is protected? (the button is from the Control Toolbox toolbar) Any ideas? |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Disbale button when worksheet protected
I'd just have the code in the commandbutton check to see if the worksheet is
protected: Option Explicit Private Sub CommandButton1_Click() If Me.ProtectContents _ Or Me.ProtectDrawingObjects _ Or Me.ProtectScenarios Then Beep 'or MsgBox "it's protected" Exit Sub End If 'your real code End Sub If you're protecting the worksheet in code, you could disable the commandbutton when you protect/unprotect the worksheet. Sarah (OGI) wrote: Is there any way of disabling a button on a worksheet when the worksheet is protected, i.e. I do not want people to click the button to refresh the data if the sheet is protected? (the button is from the Control Toolbox toolbar) Any ideas? -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Need button to add rows on protected worksheet | Excel Worksheet Functions | |||
Decimal place + - button use in protected worksheet | Excel Worksheet Functions | |||
Enabling the Filter button in a class module/protected worksheet | Excel Programming | |||
radio button on protected worksheet | Excel Programming | |||
Command button on a protected worksheet | Excel Programming |