Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Repeat titles across multiple sheets of a workbook
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. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
All sheets in workbook have same rows to repeat at top | Excel Worksheet Functions | |||
Change multiple Chart Titles in different sheets in the same Workbook | Excel Worksheet Functions | |||
Repeat the titles across multiple sheets of a workbook. | Excel Programming | |||
How to repeat a code for selected sheets (or a contiguous range of sheets) in a Workbook? | Excel Worksheet Functions | |||
How to repeat a code for selected sheets (or a contiguous range of sheets) in a Workbook? | Excel Programming |