Excel - need an serial # to update everytime sheet is printed.

C

C.

In an Excel 2003 template, is there any way to have a cell show an ID or
serial number that increases by one everytime the sheet is printed.

For example: I needed 100 copies of a single Excel form with different ID
numbers on each. If I ask to print 100 copies of the form, is there some way
to have it increment the count? (I'm open to other suggestions on how to
handle this.)
Thanks,
Cathie
 
P

Peo Sjoblom

This will print 100 copies and increment what's in B1 with 1 each time

Option Explicit

Sub PrintIncrement()
Dim i As Integer
For i = 1 To 100
Worksheets("Sheet1").Range("B1").Value =
Worksheets("Sheet1").Range("B1").Value + 1
Worksheets("Sheet1").PrintOut
Next i
End Sub

change name of sheet and cell accordingly, you might want to change the 1 To
100 to something smaller to test print to see if it's what you want
 
Top