Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Printing / March 2007

Tip: Looking for answers? Try searching our database.

[Excel] Numbering Printed Sheets

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
MacDavidov@gmail.com - 27 Feb 2007 21:22 GMT
Hello to all the community.

I write to you in order to ask a hand to find the way to print a
progressive number on every executed printout of a determined excel
sheet.

In practical I need to trace the printed publication executed for a
determined sheet, and therefore I deduce that the eventual vba script
must act on event prints, than I have unfortunately not found.

The script would have to be able to increase a counter when it comes
launch the printout from the task bar or print command under file and
possibly rember the last number when i save/close the workbook. The
macro therefore it would not have to be associated to a generic push-
button because this would force me to inhibit the press from the task
bar.

Tnx in advance to anyone can give to me one solution.

Pet
ruic - 16 Mar 2007 16:09 GMT
You probably want Workbook BeforePrint event.

Signature

Rui

> Hello to all the community.
>
[quoted text clipped - 16 lines]
>
> Pet
Gord Dibben - 16 Mar 2007 20:34 GMT
Ron de Bruin's macro will enter a consecutive number in A1 of sheet every time
it is printed.

Sub PrintCopies_ActiveSheet_2()
' This example print the number in cell A1
   Dim CopiesCount As Long
   Dim CopieNumber As Long
   CopiesCount = Application.InputBox("How many Copies do you want", Type:=1)'
enter 1 and sheet prints out and A1 gets the number 1
'next time you print enter 1 and sheet prints out and A1 changes to 2
   With ActiveSheet
       If Not IsNumeric(.Range("A1").Value) Then .Range("A1").Value = 0

       For CopieNumber = 1 To CopiesCount
           .Range("A1").Value = .Range("A1").Value + 1

           'Print the sheet
           .PrintOut

       Next CopieNumber
   End With
End Sub

Gord Dibben  MS Excel MVP

>You probably want Workbook BeforePrint event.
>
[quoted text clipped - 18 lines]
>>
>> Pet

Rate this thread:






 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.