# Freeze Panes help

#### Dan Wilson

##### Active Member
Good day. I am running Excel 2013 on Windows 10 Home. I have a workbook with 7 worksheets with several Macros. There is also a Macro in the "This Workbook" that runs every time the workbook is opened to set all the workbooks to a generic condition. Recently I discovered the need to use the Freeze Panes function to freeze Column 1 on 2 of the worksheets. All of the existing Macros use the same general formatting including freezing Row 1. How do I change the Macro in the 2 worksheets that require freezing Column 1 instead of Row 1? Any help is appreciated.
Thank you,
Dan Wilson...

### Excel Facts

How to calculate loan payments in Excel?
Use the PMT function: =PMT(5%/12,60,-25000) is for a \$25,000 loan, 5% annual interest, 60 month loan.

#### Fluff

##### MrExcel MVP, Moderator
Can you post the code that you are currently using & what are the names of the two worksheets?

#### Dan Wilson

##### Active Member
Good day again Fluff. We have to stop meeting like this, people will talk. Here is one of the macros that needs to be modified. One is named RC and the other is named Riders. Except for the actual sort coordinates and the print coordinates, the macros are the same. Is it as simple as changing the ActiveWindow.FreezePanes to ActiveColumn.FreezePanes? Also, let me know if there is anything in the macro that does not need to be there.
Thank you, Dan Wilson...

Code:
``````Sheets("RC").Select
ActiveWindow.FreezePanes = False
ActiveWindow.View = xlPageLayoutView
Application.PrintCommunication = False
With ActiveSheet.PageSetup
.RightHeader = "Page &P of &N" & Chr(10) & "RC by Lead"
.LeftFooter = ""
.CenterFooter = ""
.RightFooter = ""
.LeftMargin = Application.InchesToPoints(0.7)
.RightMargin = Application.InchesToPoints(0.7)
.TopMargin = Application.InchesToPoints(0.75)
.BottomMargin = Application.InchesToPoints(0.75)
.FooterMargin = Application.InchesToPoints(0.3)
.Zoom = 100
.PrintErrors = xlPrintErrorsDisplayed
.EvenPage.LeftFooter.Text = ""
.EvenPage.CenterFooter.Text = ""
.EvenPage.RightFooter.Text = ""
.FirstPage.LeftFooter.Text = ""
.FirstPage.CenterFooter.Text = ""
.FirstPage.RightFooter.Text = ""
End With
Application.PrintCommunication = True
ActiveWindow.View = xlNormalView
Cells.Select
With ActiveWindow
.SplitColumn = 0
.SplitRow = 1
End With
ActiveWindow.FreezePanes = True
Range("A2:EJ36").Select
ActiveWorkbook.Worksheets("RC").Sort.SortFields.Clear
SortOn:=xlSortOnValues, Order:=xlDescending, DataOption:=xlSortNormal
With ActiveWorkbook.Worksheets("RC").Sort
.SetRange Range("A2:EJ36")
.MatchCase = False
.Orientation = xlTopToBottom
.SortMethod = xlPinYin
.Apply
End With
Sheets("RC").Select
ActiveSheet.PageSetup.PrintArea = ""
Range("A1:K72").Select
ActiveSheet.PageSetup.PrintArea = "\$A\$1:\$K\$72"
Range("A1").Select
With Selection.Font
.Color = -16776961
End With
ActiveCell.FormulaR1C1 = "RC sorted by Lead"
Range("A1").Select
End Sub``````

Last edited by a moderator:

#### Fluff

##### MrExcel MVP, Moderator
Code:
`````` End With
[COLOR=#ff0000]Range("B2").Select[/COLOR]
ActiveWindow.FreezePanes = True``````

#### Dan Wilson

##### Active Member

OK, I tried what you suggested. That freezes the top 3 rows. What I want is to freeze Column A so that when I scroll to the right beyond Column BG, I will still see Column A on the left. Sorry if I didn't explain it correctly. Too bad there isn't a function "ActiveColumn.FreezePanes".
thank you, Dan Wilson...

#### Fluff

##### MrExcel MVP, Moderator
Do you have any merged cells?
Because if you select B2 & freeze panes then row1 & col A should be frozen.

#### Dan Wilson

##### Active Member

OK. There are no merged cells in the Riders worksheet. Row A has a height of 39 and Cell A1 is formatted as Wrap Text. It is used to advise the user of the sort method that was last chosen for the worksheet. Cells B1 thru F1 are blank. The ride numbers start at G1 through EA1 and have text aligned straight up and down so that all the ride numbers (19-xxx) fit in to the cell width of 2. Column A contains the rider names. Column B contains riders nicknames. Column C contains the rider membership status. Columns D and E contain formulas for total rider activity. Rows 2 and 3 contain totals of rider activity. Row 4 is totally blank for separation. Cells G6 thru EA205 contain rider activity (1 indicates attendance).

I removed the Wrap Text from Cell A1 and ran the macro with your suggestion. It eliminated Row 1 and froze Rows 2 and 3.
Thank you,
Dan Wilson...

#### Fluff

##### MrExcel MVP, Moderator
Hadn't notice that you were using split screen, so why not just
Code:
``````    With ActiveWindow
.SplitColumn = 1
.SplitRow = 1
End With``````
And get rid of the freezepanes.

#### Dan Wilson

##### Active Member
Hi Fluff. I don't know what Split Screen is. Where did you find that?
Thanks, Dan...

#### Fluff

##### MrExcel MVP, Moderator
It's in your code, I just suggested changing the red 0 to a 1
Code:
``````    With ActiveWindow
.SplitColumn = [COLOR=#ff0000]0[/COLOR]
.SplitRow = 1
End With``````

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

1,164,095
Messages
5,835,356
Members
430,351
Latest member
ddalton

### We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.

### Which adblocker are you using?

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

### Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

### Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back