Power Query
Power Pivot
Xtreme Pivot Tables
Excel for Decision Making
Excel for Finance
Excel Analysis Toolpak
Power BI
Excel
Word
Outlook
Excel Expert
Excel Customer Service
PowerPoint
November 8, 2013
Hi Marsil,
These parameters are based on the window, not on the sheet, so you have to store the parameters from the source while it's active, then activate the destination sheet and apply the same settings.
Dim CheckPanes as Boolean, RowSplit as Long, ColSplit as Long, ZoomLevel as Long
'Collect info:
ZoomLevel=ActiveWindow.Zoom
CheckPanes=ActiveWindow.FreezePanes 'I assume that you have the source sheet active at this point, make sure it is
If CheckPanes=True then
RowSplit=ActiveWindow.SplitRow
ColSplit=ActiveWindow.SplitColumn
End If
'Now, activate the target destination sheet:
Windows("FileName Here.xlsx").Activate
Worksheets("SheetName").Activate
'transfer the settings:
With ActiveWindow
.Zoom = ZoomLevel
If CheckPanes =True Then
.SplitRow = RowSplit
.SplitColumn = ColSplit
.FreezePanes = True
End If
End With
1 Guest(s)