+ Reply to Thread
Results 1 to 3 of 3

Auto Number Copies of Worksheet Printed

Hybrid View

  1. #1
    Registered User
    Join Date
    01-21-2016
    Location
    Kirksville, MO
    MS-Off Ver
    MS Office 2010
    Posts
    86

    Auto Number Copies of Worksheet Printed

    Do you know if there is a way to auto number a one page worksheet to print a different number onto bottom of page in footer? I am printing off work orders that are a one page document and I want it to print out 001, 002, 003, etc... When work orders are entered into a database they have to have a different work order number for each one and was hoping there is a way to print out instead of having to hand write on each one.

  2. #2
    Forum Expert tim201110's Avatar
    Join Date
    10-23-2011
    Location
    Russia
    MS-Off Ver
    2016, 2019
    Posts
    2,357

    Re: Auto Number Copies of Worksheet Printed

    Sub print0()
    
     'in print dialog amount=1
     n = [a3] 'may be any cell for ccpy amount
     'Application.EnableEvents = False
     
     For i = 1 To n
         With ActiveSheet.PageSetup
       '     .LeftHeader = ""
        '    .CenterHeader = ""
         '   .RightHeader = ""
          '  .LeftFooter = ""
            .CenterFooter = Format(i, "000")
     
        End With
          ActiveWindow.SelectedSheets.PrintOut
     Next i
     'Application.EnableEvents = True
    End Sub

  3. #3
    Registered User
    Join Date
    01-21-2016
    Location
    Kirksville, MO
    MS-Off Ver
    MS Office 2010
    Posts
    86

    Re: Auto Number Copies of Worksheet Printed

    It does work but prints only one copy at a time and I wanted in right header. I couldn't figure out where to change that. This is the one I used and works good with the only exception of it prints one copy at a time instead of printing all the number of copies I need.

    Sub PrintJobs()
    Dim i As Long, startnum As Long, lastnum As Long
    startnum = Application.InputBox("Enter the first job number to be printed", _
    "Print Job Number")
    lastnum = Application.InputBox("Enter the last job number to be printed", _
    "Print Job Number")
    For i = startnum To lastnum
    ActiveSheet.PageSetup.RightHeader = "Repair Order No. " & i
    ActiveWindow.SelectedSheets.PrintPreview 'PrintOut
    Next
    End Sub

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Print button fucntion to determine if 2 copies or 3 copies are printed
    By internalglitch in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 05-03-2014, 10:20 AM
  2. If one worksheet is printed, a defined second one is supposed to be printed too
    By Postlki1 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-02-2013, 03:51 AM
  3. Print Userform: Control number of Copies Printed
    By yunesm in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-15-2010, 08:34 AM
  4. Multiple copies being printed
    By trishm in forum Excel General
    Replies: 1
    Last Post: 03-12-2009, 01:14 PM
  5. Replies: 1
    Last Post: 12-07-2008, 12:21 PM
  6. [SOLVED] sequential numbering of copies printed
    By brian in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 10-11-2005, 06:05 PM
  7. can I have a cell in my worksheet to control the number of copies.
    By 1google in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-03-2005, 12:06 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1