All sheets in workbook have same rows to repeat at top

  • Thread starter Thread starter Subodh
  • Start date Start date
S

Subodh

I want to repeat the same rows (Rows 1 to 3) from a worksheet say
Sheet1 when printing any sheet
of the workbook.
When I try to do that I cannot select multiple sheet at the same time.
I also tried to select all the sheets and then try with the printing
command.
This also didn't work. It appears that this is a sheet only property.
Is there a way around.
Thanks in advance.
 
You need VBA to achieve this.

Sub test()
Dim ws As Worksheet
For Each ws In ActiveWorkbook.Sheets
'For Each ws In ActiveWindow.SelectedSheets
If ws.Type = xlWorksheet Then
ws.PageSetup.PrintTitleRows = "$1:$3"
End If
Next
End Sub

NOTE: this will select rows 1:3 of each Sheet, not rows 1:3 of Sheet1
I want to repeat the same rows (Rows 1 to 3) from a worksheet say
Sheet1 when printing any sheet

If you wanted 1:3 of Sheet1 to print on other sheets you would have to copy
those rows to each sheet.


Gord Dibben MS Excel MVP
 
Back
Top