R
rob nobel
I would like to know if it is possible to put the "Protect sheet" toolbar
button onto the actual worksheet instead of on the toolbar. This is
probably a really dumb question, but I want to have the facility to send a
worksheet with this option without affecting someone else's toolbar. I've
created a button with the following code, but it can be overridden with the
toolbar button.
Private Sub ToggleButton1_Click()
ActiveCell.Select
If ToggleButton1 = True Then
ToggleButton1.Caption = "SHEET UNPROTECTED"
ToggleButton1.ForeColor = &HFF&
ToggleButton1.BackColor = &H8000000F
ActiveSheet.Unprotect
ActiveWindow.Panes(3).Activate
Else
ToggleButton1.Caption = "SHEET PROTECTED"
ToggleButton1.ForeColor = &H808000
ActiveSheet.Protect
ActiveWindow.Panes(3).Activate
End If
End Sub
Thank you
Rob
button onto the actual worksheet instead of on the toolbar. This is
probably a really dumb question, but I want to have the facility to send a
worksheet with this option without affecting someone else's toolbar. I've
created a button with the following code, but it can be overridden with the
toolbar button.
Private Sub ToggleButton1_Click()
ActiveCell.Select
If ToggleButton1 = True Then
ToggleButton1.Caption = "SHEET UNPROTECTED"
ToggleButton1.ForeColor = &HFF&
ToggleButton1.BackColor = &H8000000F
ActiveSheet.Unprotect
ActiveWindow.Panes(3).Activate
Else
ToggleButton1.Caption = "SHEET PROTECTED"
ToggleButton1.ForeColor = &H808000
ActiveSheet.Protect
ActiveWindow.Panes(3).Activate
End If
End Sub
Thank you
Rob