View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Walter Briscoe Walter Briscoe is offline
external usenet poster
 
Posts: 279
Default Freeze Panes loss

In message of Thu, 14 Nov 2013 00:49:00 in
microsoft.public.excel.worksheet.functions, GS
writes
The FreezePanes feature belongs to the Window object, not the
Worksheet. Copying the worksheet (via VBA) doesn't include any window
settings, thus no frozen panes.


I know FreezePanes is a Window property.
I don't know how the Window Object relates to the Worksheet object.


This is not the same as copying via the 'Ply' toolbar menu when you
right-click a sheet tab. This also copies the window settings and so
frozen panes persist in the copy.


Sheets("foo").Copy Befo=Sheets(1) is an "Edit\Move or Copy Sheet..."

Sheets("foo").Select
Sheets("foo").Copy Befo=Sheets(1)
is the result of clicking on the sheet name and doing "Move or Copy..."
by a right click. As you say, that copies FreezePanes settings.

The same is done by clicking on the sheet name and doing "Edit\Move or
Copy Sheet..."

Clicking the sheet name and doing "Window\New Window" creates a Window
object, to which FreezePanes is not copied. The underlying VBA is
Sheets("foo").Select
ActiveWindow.NewWindow

My usual use of "Window\New Window" ia to put 2 windows on the screen
and clicking one, so I can see 2 sheets in a workbook simultaneously. I
will need to be disciplined, in loading the new window to see another
sheet.

Thank you for the help.



HTH


--
Walter Briscoe