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: 98
Default Question with existing page numbering macro?

Hi the code below is an abstract from a macro I use to automatically page
numbers when printing,

Sub workbook_BeforePrint(Cancel As Boolean)
With Worksheets("sheet1")
..PageSetup.CenterFooter = "" & .Range("A1").Text
End With

With Worksheets("sheet2")
..PageSetup.CenterFooter = "" & .Range("a1").Text
End With

'etc etc

End Sub

The macro functions as required and is placed within Thisworkbook.

As the number of pages have grown to 20, the macro will only function if I
press print preview before printing, otherwise the page numbering is not
updated. I'm guessing the print function is quicker than the macro and it
doesn't get chance to complete.

Not the end of the world, but I just wondered if there was a way to get
around this to allolw the macro enough time to complete before the printing
starts?


--
This post was created using recycled electrons!
 
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
Auto Page Numbering Question ChuckF Excel Discussion (Misc queries) 2 May 12th 10 07:27 PM
start page numbering from page 2 in excel swa Excel Discussion (Misc queries) 2 July 25th 07 04:53 PM
Question with existing print macro Newbeetle Excel Discussion (Misc queries) 5 February 13th 07 10:05 AM
Page numbering question waiteja Excel Discussion (Misc queries) 2 February 2nd 06 09:02 PM
Revised Question on Page Numbering Brady Snow Excel Programming 0 October 28th 03 04:34 PM


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