Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2
Default How do I set global in print titles?

Every time I print multiple pages I have to go to Page Setup, select Sheet
and then put $1:$1 in the Print titles box. Is there a way to set that
globally so all I have to do is change it if I need a different print area?
--
Clark
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22,906
Default How do I set global in print titles?

Clark

You could run a small macro to set the print titles for all sheets in a
workbook.

Sub Print_Row()
For Each oSheet In oSheets
If oSheet.Type = xlWorksheet Then
oSheet.PageSetup.PrintTitleRows = "$1:$1"
End If
Next
End Sub

Or for just one sheet, which could be placed in a Workbook_BeforePrint event in
Thisworkbook

Private Sub Workbook_BeforePrint(Cancel As Boolean)
Dim oSheet As Worksheet
Set oSheet = ActiveSheet
With oSheet
If oSheet.Type = xlWorksheet Then
oSheet.PageSetup.PrintTitleRows = "$1:$1"
End If
End With
End Sub

As an alternative to VBA you could just create a workbook Template with your
seetings that would become the default New workbook for Excel.

See this thread for more info on that.

http://tinyurl.com/3x4ety


Gord Dibben MS Excel MVP


On Thu, 24 Jan 2008 10:28:02 -0800, clarkb
wrote:

Every time I print multiple pages I have to go to Page Setup, select Sheet
and then put $1:$1 in the Print titles box. Is there a way to set that
globally so all I have to do is change it if I need a different print area?


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2
Default How do I set global in print titles?

Thanks, Gord. I did what you said in 'http://tinyurl.com/3x4ety'
and it works great for opening new sheets, however, the problem I was having
was exporting data from Access to Excel using the Print Preview then Analyze
with Excel feature. I do this a lot and I always want the pages to be
landscape and print titles to repeat on each page. The fix didn't work
because Access directly inserts the data into a sheet/book and not into
'sheet.xlt'. Any suggestions would be appreciated.
--
Clark


"Gord Dibben" wrote:

Clark

You could run a small macro to set the print titles for all sheets in a
workbook.

Sub Print_Row()
For Each oSheet In oSheets
If oSheet.Type = xlWorksheet Then
oSheet.PageSetup.PrintTitleRows = "$1:$1"
End If
Next
End Sub

Or for just one sheet, which could be placed in a Workbook_BeforePrint event in
Thisworkbook

Private Sub Workbook_BeforePrint(Cancel As Boolean)
Dim oSheet As Worksheet
Set oSheet = ActiveSheet
With oSheet
If oSheet.Type = xlWorksheet Then
oSheet.PageSetup.PrintTitleRows = "$1:$1"
End If
End With
End Sub

As an alternative to VBA you could just create a workbook Template with your
seetings that would become the default New workbook for Excel.

See this thread for more info on that.

http://tinyurl.com/3x4ety


Gord Dibben MS Excel MVP


On Thu, 24 Jan 2008 10:28:02 -0800, clarkb
wrote:

Every time I print multiple pages I have to go to Page Setup, select Sheet
and then put $1:$1 in the Print titles box. Is there a way to set that
globally so all I have to do is change it if I need a different print area?



  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22,906
Default How do I set global in print titles?

Don't bother with the Template if Access creates its own workbook and sheet
from Excel's default.

After the workbook and sheet(s) have been created by Access, run this macro.

Sub Print_Row()
Dim oSheet As Worksheet
For Each oSheet In ActiveWorkbook.Sheets
If oSheet.Type = xlWorksheet Then
With oSheet.PageSetup
.PrintTitleRows = "$1:$1"
.Orientation = xlLandscape
End With
End If
Next
End Sub

Store it in your Personal.xls so's it is available for all open workbooks.


Gord

On Wed, 30 Jan 2008 06:00:03 -0800, clarkb
wrote:

Thanks, Gord. I did what you said in 'http://tinyurl.com/3x4ety'
and it works great for opening new sheets, however, the problem I was having
was exporting data from Access to Excel using the Print Preview then Analyze
with Excel feature. I do this a lot and I always want the pages to be
landscape and print titles to repeat on each page. The fix didn't work
because Access directly inserts the data into a sheet/book and not into
'sheet.xlt'. Any suggestions would be appreciated.


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
print titles Crazyman Excel Discussion (Misc queries) 0 June 6th 07 11:00 PM
Global Print Specs Steve Williams Excel Worksheet Functions 0 November 21st 05 09:37 PM
Global Print Setup Steve Williams Setting up and Configuration of Excel 0 November 21st 05 09:37 PM
Global Print Specs Steve Williams Excel Discussion (Misc queries) 0 November 18th 05 06:16 PM
Print titles Roger Bedford Excel Discussion (Misc queries) 1 December 12th 04 08:35 AM


All times are GMT +1. The time now is 06:53 AM.

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

About Us

"It's about Microsoft Excel"