imback2nite
Board Regular
- Joined
- Oct 30, 2004
- Messages
- 211
- Office Version
- 2003 or older
- Platform
- Windows
This should be easy but... For some reason I cannot rename Command Button 10. It is in a frame on a Userform. I don't know if that makes a difference. I'm using Windows 10 and Excel 2003. Thank You!!!
VBA Code:
Private Sub CommandButton10_Click()
ActiveSheet.Unprotect
If ActiveWindow.FreezePanes = False Then
ActiveWindow.FreezePanes = True
Me.CommandButton10.Caption = "Freeze Pane"
ElseIf ActiveWindow.FreezePanes = True Then
ActiveWindow.FreezePanes = False
Me.CommandButton10.Caption = "Unfreeze Pane"
End If
Unload UserForm2
ActiveSheet.Protect
End Sub
Last edited: