Auto incrementing number on sheet when printing

Gilbertr14

New Member
Joined
Oct 19, 2009
Messages
8
Hello

One of the users in our company needs a jobsheet in excel format.

They print out 100 odd copies at a time, but each one needs a unique number.

These are sequential, and would carry on from the last printed batch.

Its in 2007.
 

Excel Facts

Do you hate GETPIVOTDATA?
Prevent GETPIVOTDATA. Select inside a PivotTable. In the Analyze tab of the ribbon, open the dropown next to Options and turn it off
Maybe something like this:

Excel Workbook
ABCDEF
1Worksheet #1
2
3DataDataDataDataDataData
4DataDataDataDataDataData
5DataDataDataDataDataData
Sheet1



Code:
Sub print_sheet()
P = InputBox("How many sheets?")
    For I = 1 To P Step 1
        Worksheets("Sheet1").PrintOut
        Range("B1").Value = Range("B1").Value + 1
    Next I
End Sub
 
Upvote 0

Forum statistics

Threads
1,223,262
Messages
6,171,080
Members
452,377
Latest member
bradfordsam

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