Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
I have an excel 2003 spreadsheet with 215 identical pages - is there a macro
or formula to set the freeze pane function on all of them? The cell that would need to be selected would be D6 on sheets1 to 215... Any help or insight would be greatly appreciated Thanks mastersparky |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Assuming this is a continuation of your previous question and the worksheets
you want this are all named SheetX (where X is a number from 1 to 215), then this macro will do what you want... Sub FreezePanes() Dim X As Long On Error GoTo CleanUp For X = 1 To 215 Application.ScreenUpdating = False Worksheets("Sheet" & X).Activate With ActiveWindow .SplitRow = 6 .SplitColumn = 4 ' Omit the next line if you want to Split ' the Panes rather than to Freeze the Panes .FreezePanes = True End With Next CleanUp: Application.ScreenUpdating = True End Sub -- Rick (MVP - Excel) "mastersparky" wrote in message ... I have an excel 2003 spreadsheet with 215 identical pages - is there a macro or formula to set the freeze pane function on all of them? The cell that would need to be selected would be D6 on sheets1 to 215... Any help or insight would be greatly appreciated Thanks mastersparky |
#3
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Your assuption was correct :)
Thanks again very much - the macro worked great!!! "Rick Rothstein" wrote: Assuming this is a continuation of your previous question and the worksheets you want this are all named SheetX (where X is a number from 1 to 215), then this macro will do what you want... Sub FreezePanes() Dim X As Long On Error GoTo CleanUp For X = 1 To 215 Application.ScreenUpdating = False Worksheets("Sheet" & X).Activate With ActiveWindow .SplitRow = 6 .SplitColumn = 4 ' Omit the next line if you want to Split ' the Panes rather than to Freeze the Panes .FreezePanes = True End With Next CleanUp: Application.ScreenUpdating = True End Sub -- Rick (MVP - Excel) "mastersparky" wrote in message ... I have an excel 2003 spreadsheet with 215 identical pages - is there a macro or formula to set the freeze pane function on all of them? The cell that would need to be selected would be D6 on sheets1 to 215... Any help or insight would be greatly appreciated Thanks mastersparky |
#4
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Option Explicit
Sub testme() Dim wks As Worksheet For Each wks In ActiveWorkbook.Worksheets wks.Select wks.Range("a1").Select 'so A1 is visible in the top left wks.Range("d16").Select ActiveWindow.FreezePanes = True Next wks End Sub mastersparky wrote: I have an excel 2003 spreadsheet with 215 identical pages - is there a macro or formula to set the freeze pane function on all of them? The cell that would need to be selected would be D6 on sheets1 to 215... Any help or insight would be greatly appreciated Thanks mastersparky -- Dave Peterson |
#5
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Hi,
Might as well throw my variation into the mix: Sub FreezePanes() Dim sh As Worksheet For Each sh In Worksheets sh.Activate [D6].Select ActiveWindow.FreezePanes = True Next sh End Sub -- Thanks, Shane Devenshire "mastersparky" wrote: I have an excel 2003 spreadsheet with 215 identical pages - is there a macro or formula to set the freeze pane function on all of them? The cell that would need to be selected would be D6 on sheets1 to 215... Any help or insight would be greatly appreciated Thanks mastersparky |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Excel 2003 freeze panes won't freeze top row only | Excel Discussion (Misc queries) | |||
Freeze Panes | Excel Worksheet Functions | |||
Freeze Panes | Setting up and Configuration of Excel | |||
Freeze panes | Excel Discussion (Misc queries) | |||
Not quite "Freeze Panes"..... | Excel Discussion (Misc queries) |