Repeat titles across multiple sheets of a workbook

S

Subodh

I want to repeat the same text in the titles across multiple sheets
of
a workbook. I grouped the sheets but the pagesetup shows the options
under the
Sheet Tab Disabled. I want to print titles by repeating the same text
on the top of all
the workbook. Copying the required titles to multiple sheets won't be
a good option because each workbook contains many sheet and there are
several workbooks. As this cannot be done with grouped sheets it would
require VBA macro to perform the operation.
I tried the following code by Gord Dibben.
'select all sheets and then run the macro.
Dim pArea As String, titleRows As String, titleCols As String
Sub Same_Titles()
titleRows = ActiveSheet.PageSetup.PrintTitleRows
titleCols = ActiveSheet.PageSetup.PrintTitleColumns
For Each oSheet In ActiveWindow.SelectedSheets
If TypeName(oSheet) = "Worksheet" Then
oSheet.PageSetup.PrintTitleColumns = titleCols
oSheet.PageSetup.PrintTitleRows = titleRows
End If
Next
End Sub
This worked but not as i required. This sets the same print range and
rows to repeat at top on
each sheet in grouped sheets. ie. Rows 1:3 in each of each
Sheet1,Sheet2.............. are repeated in their respective pages.
But what i need is to repeat the Rows 1:3 of Sheet 1 to be repeated
in
the top of the Sheet1 as well as Sheet2,Sheet3 and other sheets in
the
workbook.
Any help would be appreciated.
Thanks in advance.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top