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 Using named range value during Workbook_BeforePrint event

I have the following procedu

Sub Workbook_BeforePrint(Cancel As Boolean)
With ActiveSheet.PageSetup
.LeftHeader = ""
.CenterHeader = _
"&""Arial,Bold""&12 NNN TITLE&""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
End Sub

I'd like to add the range name "TEST" in where it has NNN in the
..CenterHeader. What do I need to change?

Thanks
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,593
Default Using named range value during Workbook_BeforePrint event

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


--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"Barb Reinhardt" wrote in message
...
I have the following procedu

Sub Workbook_BeforePrint(Cancel As Boolean)
With ActiveSheet.PageSetup
.LeftHeader = ""
.CenterHeader = _
"&""Arial,Bold""&12 NNN TITLE&""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
End Sub

I'd like to add the range name "TEST" in where it has NNN in the
.CenterHeader. What do I need to change?

Thanks



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
Using Named Range in Worksheet_Change event Barb Reinhardt Excel Programming 2 July 11th 06 09:18 PM
inserting a named range into new cells based on a named cell Peter S. Excel Discussion (Misc queries) 1 June 4th 06 03:53 AM
If any cell in named range = 8 then shade named range JJ[_8_] Excel Programming 3 August 26th 05 11:09 PM
Change event triggered by a named range Sean Excel Programming 4 August 1st 05 03:01 AM
Change Event on a named range GregR Excel Programming 2 July 12th 05 09:37 PM


All times are GMT +1. The time now is 04:08 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"