LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 56
Default Update header BeforePrint

I would like to create a macro that automatically runs when the worksheet is
printed (prior to actually) I currently have a button that runs this macro
when clicked:

Sub Header()
Dim Header As String
Header = Range("D2").Value
With ActiveSheet.PageSetup
.CenterHeader = "&12Service Body & Options" & Chr(10) & "APS Vehicle#"
& _ Header
End With
End Sub

I would like to get rid of this button and have this routine run when the
printer icon or FilePrint is selected. I played with the
App_WorkbookBeforePrint from the help file but could not get it to work right.

Any ideas?
 
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
Header/Footer to update on all sheets Jonno Excel Discussion (Misc queries) 5 August 13th 09 01:15 PM
BeforePrint macro Steve O Excel Discussion (Misc queries) 4 September 21st 05 01:09 AM
BeforePrint event EnglishTeacher Excel Programming 4 October 13th 04 04:17 PM
Help with BeforePrint Eric[_7_] Excel Programming 2 October 9th 03 07:44 PM


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