ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Allow Users to Unfreeze Panes in a Protected Workbook/Sheet (https://www.excelbanter.com/excel-programming/423918-allow-users-unfreeze-panes-protected-workbook-sheet.html)

ac1179

Allow Users to Unfreeze Panes in a Protected Workbook/Sheet
 
my company upgraded from excel 2003 to 2007. I have a workbook with
worksheets that's password protected. In excel 2003 users could
unfreeze panes from the menu options without unprotecting the sheets.
But in excel 2007 the freeze/unfreeze panies icon is grayed out. Is
there some macro code that i could include to let users unfreeze
panes?

When you manually protect a sheet... under the dialog box "Allow all
users in this worksheet to" there's a list of options... such as:
select locked cells, unlock cells, delete rows, etc. But I don't see
freeze panes.

Please help. Thanks!

Heera[_2_]

Allow Users to Unfreeze Panes in a Protected Workbook/Sheet
 
Hi,

To freeze pane use this

Sub freze()

ActiveSheet.Unprotect , Password:="123" ' Type your password instead of 123
ActiveWindow.FreezePanes = True
ActiveSheet.Protect , Password:="123"

End Sub

To unfreeze pane


Sub unfreze()

ActiveSheet.Unprotect , Password:="123" ' Type your password instead of 123
ActiveWindow.FreezePanes = false
ActiveSheet.Protect , Password:="123"

End Sub

Regards
Heera

ac1179

Allow Users to Unfreeze Panes in a Protected Workbook/Sheet
 
On Feb 11, 4:51*pm, Heera wrote:
Hi,

To freeze pane use this

Sub freze()

ActiveSheet.Unprotect , Password:="123" ' Type your password instead of 123
ActiveWindow.FreezePanes = True *
ActiveSheet.Protect , Password:="123"

End Sub

To unfreeze pane

Sub unfreze()

ActiveSheet.Unprotect , Password:="123" ' Type your password instead of 123
ActiveWindow.FreezePanes = false
ActiveSheet.Protect , Password:="123"

End Sub

Regards
Heera


I have a macro already in the workbook that unprotects and protects
sheets. I left default frozen panes in some sheets, but I'd like to
give the user the capability to unfreeze them if they want through the
unfreeze icon from the view ribbon. Is that possible?


All times are GMT +1. The time now is 11:19 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com