SaraWitch
Active Member
- Joined
- Sep 29, 2015
- Messages
- 377
- Office Version
- 365
- Platform
- Windows
Hello peeps.
Is there a way to prevent users from unfreezing panes in a shared workbook? It used to be done by selecting 'Windows' in the Protect Workbook function, but this feature has been deprecated. I also tried a vba that I found elsewhere, but this does not work either.
If this can be done, any help would be appreciated
Is there a way to prevent users from unfreezing panes in a shared workbook? It used to be done by selecting 'Windows' in the Protect Workbook function, but this feature has been deprecated. I also tried a vba that I found elsewhere, but this does not work either.
VBA Code:
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Dim cellreturn As String
cellreturn = ActiveCell.Address
Application.EnableEvents = False
If Not ActiveWindow.FreezePanes Then
ActiveSheet.Range("A3").Select ' change address to where you want panes frozen
ActiveWindow.FreezePanes = True
ActiveSheet.Range(cellreturn).Select
End If
Application.EnableEvents = True
End Sub
If this can be done, any help would be appreciated