Printing sequential numbers

BMI

New Member
Joined
Oct 30, 2009
Messages
19
I have created a form in excel. I will be using this form to print many duplicates of the same form but I need the forms to have numbers sequentially printed on them (ie. Ticket 001, 002, 003, etc.) Is there a way to make excel do this?

If so, can I print form numbers 001-303 and then come back later and tell excel to start printing the form using the beginning number 304-477 or whatever number I choose? Thank you!:p
 

Excel Facts

Back into an answer in Excel
Use Data, What-If Analysis, Goal Seek to find the correct input cell value to reach a desired result
You can use a macro such as this:

Code:
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", 1, , , , , 1)
    lastnum = Application.InputBox("Enter the last job number to be printed", "Print Job Number", 1, , , , , 1)

    For i = startnum To lastnum
        Range("B1").Value = i
        ActiveWindow.SelectedSheets.PrintOut
    Next

End Sub
 
Upvote 0
I am new to macros and VBA. I am sure you probably know an easy way to tweak the macro you sent me to accomplish the following: I am creating 2 part forms so I just realized I need Excel to print each page in the sequence TWICE. For example 113, 113, 114, 114, 115, 115, etc. instead of just 113, 114, 115, etc.

Thank you!
 
Upvote 0
If you just need two copies printed out, this might work:

Code:
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", 1, , , , , 1)
    lastnum = Application.InputBox("Enter the last job number to be printed", "Print Job Number", 1, , , , , 1)

    For i = startnum To lastnum
        Range("B1").Value = i
        ActiveWindow.SelectedSheets.PrintOut copies:=2
    Next

End Sub
 
Upvote 0
Is there a way to revise this macro to print sequential dates (10/30/10, 10/31/10, 11/1/10, etc.) instead of using simple numbers?

Thanks!
 
Upvote 0
try this:

Code:
Sub PrintJobs()
Dim i As Long, startnum As Date

    startnum = Application.InputBox("Enter the starting date (dd/mm/yyyy)", "Print Job Number", Date, , , , , 1)
    If startnum = 0 Then Exit Sub 'user clicked Cancel

    For i = 1 To ActiveWindow.SelectedSheets.Count
        ActiveWindow.SelectedSheets(i).Range("B1").Value = startnum
        ActiveWindow.SelectedSheets(i).Range("B1").EntireColumn.AutoFit
        ActiveWindow.SelectedSheets.PrintOut copies:=2
    Next

End Sub
 
Upvote 0
I am trying to do this exact same thing however I've never created a macro and am struggling with this code. I would be very gratful for any simple instructions on how to make this work. I'm using Excel 2010 and am trying to print a form that I need the number to be sequential.
Thank you.
 
Upvote 0
I am trying to do this exact same thing however I've never created a macro and am struggling with this code. I would be very gratful for any simple instructions on how to make this work. I'm using Excel 2010 and am trying to print a form that I need the number to be sequential.
Thank you.

Purchasing,

If you need help copying this macro to your personal macro workbook, follow the directions here....

Copy your macros to a Personal Macro Workbook - Excel - Office.com
 
Upvote 0

Forum statistics

Threads
1,214,920
Messages
6,122,262
Members
449,075
Latest member
staticfluids

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top