View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Walter Briscoe Walter Briscoe is offline
external usenet poster
 
Posts: 279
Default FreezePanes is a window property

In message of Fri, 9 Dec 2016 11:24:09 in
microsoft.public.excel.programming, Claus Busch <claus_busch@t-
online.de writes
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

Thanks, Claus. I agree.
I don't know how I got it wrong. ;)
--
Walter Briscoe