View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Claus Busch Claus Busch is offline
external usenet poster
 
Posts: 3,872
Default FreezePanes is a window property

Hi Walter,

Am Fri, 9 Dec 2016 10:02:06 +0000 schrieb Walter Briscoe:

With ActiveWindow
.SplitColumn = 1
.SplitRow = 1
.FreezePanes = True
End With


Can I simplify?


with SplitColumn =1 you freeze column A (1) and with
SplitRow=1 you freeze row 1. There is no need to select a cell.
Try for all sheets:

Private Sub Workbook_SheetActivate(ByVal Sh As Object)
With ActiveWindow
.SplitColumn = 1
.SplitRow = 1
.FreezePanes = True
End With
End Sub


Regards
Claus B.
--
Windows10
Office 2016