Autonumber in Forms while printing

  • Thread starter Thread starter Alice
  • Start date Start date
A

Alice

I need to print forms from excel with auto-number
generated during printing. eg 001, 002, 003

How can I do it?

Thanks!
 
Is this a worksheet that's set up to look like a form?

If yes, you could use a little macro and run that whenever you needed copies:

Option Explicit
Sub testme()

Dim myMin As Long
Dim myMax As Long
Dim iCtr As Long

myMin = 1
myMax = 3

For iCtr = myMin To myMax
With Worksheets("sheet1")
.Range("a1").Value = iCtr
.PrintOut preview:=True
End With
Next iCtr

End Sub

I put the value in A1 (which was already formatted nicely, "000").

Change the myMin and myMax to what you want and get rid of the preview:=true
when you're ready to kill some trees!

If you're new to macros, you may want to read David McRitchie's intro at:
http://www.mvps.org/dmcritchie/excel/getstarted.htm
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top