Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 99
Default Sheet and workbook code: All sheets should have row 1 to 5 of Sheet1to be repeated at top

I want to make code to make all the sheets have same ROWS TO REPEAT AT
TOP on all the sheets of a workbook. ie. all the sheets in a work book
should have row1 to row5 of sheet1 to repeated at the top.
But, they cannot be made?
The Sheets to repeat on top is only for sheet
I want to make the sheet code for the workbook.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,203
Default Sheet and workbook code: All sheets should have row 1 to 5 of Shee

Your best solution is to copy rows 1 through 5 from Sheet1 into all other
sheets and use Page Setup to repeat rows 1:5 on each sheet when it is printed.

If the entries in rows 1:5 of Sheet1 change often and you need to have the
same entries on all other sheets, then set up the entries on the other sheets
to link back to the appropriate cell on Sheet1. For example, in cell A1 of
each of the other sheets, you could put the formula:
=Sheet1!A1
You can then easily 'fill' that formula over and down the sheet for as many
columns and down to row 5 so that whatever is on Sheet1 in rows 1:5 always
appears on the other sheets.


"Subodh" wrote:

I want to make code to make all the sheets have same ROWS TO REPEAT AT
TOP on all the sheets of a workbook. ie. all the sheets in a work book
should have row1 to row5 of sheet1 to repeated at the top.
But, they cannot be made?
The Sheets to repeat on top is only for sheet
I want to make the sheet code for the workbook.
.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22,906
Default Sheet and workbook code: All sheets should have row 1 to 5 of Sheet1 to be repeated at top

Sub titles()
Dim ws As Worksheet
For Each ws In ActiveWorkbook.WorkSheets
If ws.Type = xlWorksheet Then
ws.PageSetup.PrintTitleRows = "$1:$5"
End If
Next
End Sub


Gord Dibben MS Excel MVP

On Tue, 23 Mar 2010 18:51:49 -0700 (PDT), Subodh
wrote:

I want to make code to make all the sheets have same ROWS TO REPEAT AT
TOP on all the sheets of a workbook. ie. all the sheets in a work book
should have row1 to row5 of sheet1 to repeated at the top.
But, they cannot be made?
The Sheets to repeat on top is only for sheet
I want to make the sheet code for the workbook.


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22,906
Default Sheet and workbook code: All sheets should have row 1 to 5 of Sheet1 to be repeated at top

Ignore this.

Misread the question.


Gord

On Thu, 25 Mar 2010 09:31:41 -0700, Gord Dibben <gorddibbATshawDOTca wrote:

Sub titles()
Dim ws As Worksheet
For Each ws In ActiveWorkbook.WorkSheets
If ws.Type = xlWorksheet Then
ws.PageSetup.PrintTitleRows = "$1:$5"
End If
Next
End Sub


Gord Dibben MS Excel MVP

On Tue, 23 Mar 2010 18:51:49 -0700 (PDT), Subodh
wrote:

I want to make code to make all the sheets have same ROWS TO REPEAT AT
TOP on all the sheets of a workbook. ie. all the sheets in a work book
should have row1 to row5 of sheet1 to repeated at the top.
But, they cannot be made?
The Sheets to repeat on top is only for sheet
I want to make the sheet code for the workbook.


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Make the same titles repeated in multiple sheets of a workbook Subodh Excel Programming 0 October 22nd 09 01:50 PM
How to repeat a code for selected sheets (or a contiguous range of sheets) in a Workbook? Dmitry Excel Worksheet Functions 6 March 29th 06 12:43 PM
How to repeat a code for selected sheets (or a contiguous range of sheets) in a Workbook? Dmitry Excel Programming 6 March 29th 06 12:43 PM
Identify repeated cell entries in multiple sheet workbook as you . Trigger Excel Discussion (Misc queries) 0 August 17th 05 01:57 AM
run code on opening workbook and apply code to certain sheets Jane Excel Programming 7 August 8th 05 09:15 AM


All times are GMT +1. The time now is 05:28 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"