Allow Users to Unfreeze Panes in a Protected Workbook/Sheet

A

ac1179

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!
 
H

Heera

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
 
A

ac1179

Hi,

To freeze pane use this

Sub freze()

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

End Sub

To unfreeze pane

Sub unfreze()

ActiveSheet.Unprotect , Password:="123" ' Type your password instead of123
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?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top