Freeze Panes Glitch - Repeats Column Headers

jewkes6000

Board Regular
Joined
Mar 25, 2020
Messages
55
Office Version
  1. 365
Platform
  1. Windows
I have an issue when freezing panes on my worksheet. The location of the freeze pane cell is at W26. Note that columns A through Q are hidden and rows 1 through 14 are hidden. The issues is that when I freeze the panes, all of the data from R15 to V24 gets repeated across the top of my page (see before and after screen shots for visual). The freezing of the panes is being done through a VBA macro using the code below. Columns X through AC are hidden before applying this code:

VBA Code:
        'This freezes the panes at the top of the sheet
        Range("R23").Select
        Selection.End(xlToRight).Offset(3, 0).Select
        ActiveWindow.ScrollRow = 1
        ActiveWindow.ScrollColumn = 1
        ActiveWindow.FreezePanes = True


Last, if I simply close the workbook and reopen it, the problem goes away. But this can get time consuming having to continually close & open the workbook. Also, this issue only happens sometimes.


1617053560492.png



1617053594908.png
 
Last edited:

Excel Facts

Square and cube roots
The =SQRT(25) is a square root. For a cube root, use =125^(1/3). For a fourth root, use =625^(1/4).

Watch MrExcel Video

Forum statistics

Threads
1,129,710
Messages
5,637,917
Members
416,992
Latest member
lo_

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.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

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

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

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
Top