Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,355
Default ActiveSheet header including a named range

I've had difficulty posting this so am not if it's been posted. If this is a
duplicate, please accept my apologies.

I have the following worksheet_beforeprint event

Sub Workbook_BeforePrint(Cancel As Boolean)
Application.ScreenUpdating = False
With ActiveSheet.PageSetup
.LeftHeader = ""
.CenterHeader = _
"&""Arial,Bold""&12 TEST: &""Arial,Regular""&10" _
& Chr(10) & "Last date saved: " &
Format(ThisWorkbook.BuiltinDocumentProperties("las t save time").Value,
"dd-mmm-yyyy")
.RightHeader = ""
.LeftFooter = ""
.CenterFooter = "" & Chr(10) & "&P of &N"
.RightFooter = ""
End With
Application.ScreenUpdating = True
End Sub

For the CENTER HEADER, I want to display the named range PROGRAM prior to
the value TEST. How do I do this?

Thanks in advance
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default ActiveSheet header including a named range


Do you want this Barb

.CenterHeader = _
"&""Arial,Bold""&12" & Range("PROGRAM").Value & " Test:" & _
"&""Arial,Regular""&10" & Chr(10) & "Last date saved: " & _
Format(ThisWorkbook.BuiltinDocumentProperties("las t save time").Value, "dd-mmm-yyyy")

--
Regards Ron de Bruin
http://www.rondebruin.nl



"Barb Reinhardt" wrote in message
...
I've had difficulty posting this so am not if it's been posted. If this is a
duplicate, please accept my apologies.

I have the following worksheet_beforeprint event

Sub Workbook_BeforePrint(Cancel As Boolean)
Application.ScreenUpdating = False
With ActiveSheet.PageSetup
.LeftHeader = ""
.CenterHeader = _
"&""Arial,Bold""&12 TEST: &""Arial,Regular""&10" _
& Chr(10) & "Last date saved: " &
Format(ThisWorkbook.BuiltinDocumentProperties("las t save time").Value,
"dd-mmm-yyyy")
.RightHeader = ""
.LeftFooter = ""
.CenterFooter = "" & Chr(10) & "&P of &N"
.RightFooter = ""
End With
Application.ScreenUpdating = True
End Sub

For the CENTER HEADER, I want to display the named range PROGRAM prior to
the value TEST. How do I do this?

Thanks in advance



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,355
Default ActiveSheet header including a named range

Thanks, that does it.

"Ron de Bruin" wrote:


Do you want this Barb

.CenterHeader = _
"&""Arial,Bold""&12" & Range("PROGRAM").Value & " Test:" & _
"&""Arial,Regular""&10" & Chr(10) & "Last date saved: " & _
Format(ThisWorkbook.BuiltinDocumentProperties("las t save time").Value, "dd-mmm-yyyy")

--
Regards Ron de Bruin
http://www.rondebruin.nl



"Barb Reinhardt" wrote in message
...
I've had difficulty posting this so am not if it's been posted. If this is a
duplicate, please accept my apologies.

I have the following worksheet_beforeprint event

Sub Workbook_BeforePrint(Cancel As Boolean)
Application.ScreenUpdating = False
With ActiveSheet.PageSetup
.LeftHeader = ""
.CenterHeader = _
"&""Arial,Bold""&12 TEST: &""Arial,Regular""&10" _
& Chr(10) & "Last date saved: " &
Format(ThisWorkbook.BuiltinDocumentProperties("las t save time").Value,
"dd-mmm-yyyy")
.RightHeader = ""
.LeftFooter = ""
.CenterFooter = "" & Chr(10) & "&P of &N"
.RightFooter = ""
End With
Application.ScreenUpdating = True
End Sub

For the CENTER HEADER, I want to display the named range PROGRAM prior to
the value TEST. How do I do this?

Thanks in advance




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
Named Range in Customer Header Rebecca_SUNY Excel Discussion (Misc queries) 1 April 13th 09 10:37 PM
Creating a Dynamic Named Range Using Sheet Name and Column Header burl_rfc_h Excel Programming 8 February 13th 06 10:53 PM
Using a named range in a header with VBA? [email protected] Excel Discussion (Misc queries) 5 October 27th 05 10:52 AM
Named Range in Center Header Joel Mills Excel Programming 6 January 5th 05 08:03 PM
Can't Get data without including Header using ADO Dave B[_4_] Excel Programming 3 October 4th 03 03:54 AM


All times are GMT +1. The time now is 03:01 PM.

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"