jewkes6000
Board Regular
- Joined
- Mar 25, 2020
- Messages
- 60
- Office Version
- 365
- Platform
- 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:
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.
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.
Last edited: