Thread: Freeze Panes
View Single Post
  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
sjm cpa sjm cpa is offline
external usenet poster
 
Posts: 4
Default Freeze Panes

I am trying it out today. Thanks so much for your help, I haven't done macros
in a while.

"Gord Dibben" wrote:

Maybe you don't understand what the macro does?

The code will unprotect only to allow the cell selection for Freeze Panes
then re-protect.

So it can be an option for that one operation.


Gord

On Thu, 11 Sep 2008 12:26:01 -0700, sjm cpa
wrote:

The workbook is not protected, just the worksheet page. From what I can
tell, this is new for 2007. Unprotecting the worksheet is not an option.

"Gord Dibben" wrote:

I don't use 2007 but in 2003 you can freeze/unfreeze panes on a protected
worksheet.

You cannot freeze panes on a protected workbook.

If that is the case then use this macro.

Sub freeze()
ActiveWorkbook.Unprotect Password:="justme"
ActiveWindow.FreezePanes = False
Set srng = Application.InputBox(prompt:= _
"Select a cell", Type:=8)
srng.Select
ActiveWindow.FreezePanes = True
ActiveWorkbook.Protect Password:="justme", _
Structu=True, Windows:=True
End Sub


Gord Dibben MS Excel MVP

On Thu, 11 Sep 2008 10:10:01 -0700, sjm cpa
wrote:

When I protect a worksheet in Excel 2007, the freeze pane option is not
available (grayed out). How can I make the option available without removing
worksheet protection?