A print macro?

  • Thread starter Thread starter John Kitchens
  • Start date Start date
J

John Kitchens

Hello. I am using Excel 2000. I have made a spreadsheet that will allow me
to produce W2 forms. It works great, but I need some help with the printing.

On one worksheet I have the information so that i can produce 100 W2's. I
have 2 per sheet just like the real form. When I print preview I have a
total of 50 printable pages.

What I would like to do is to have a dialog box that I could type in page 1,
page 2, etc.

What my plan is to print 1 page at a time. I have to print 6 copies of each
W2. I would like to type in a dialog box etc. "page 1" and have the macro
know that I want to print the first copy of page 1. I then would want the
system to pause until the first page printed and then I could tell it to now
print page 2, and then go through the same process until it printed all 6
sheets.

Then I would like to start over with page 2. I would like to have this so
that I could do this for all 50 pages.

I hope this makes sense. Is there anyway to do this with a macro?

Any help would be greatly appreciated.
 
Or maybe just print all of it at once???

Option Explicit
Sub testme()

Dim TotalPages As Long
Dim pCtr As Long
Dim xTimes As Long

TotalPages = ExecuteExcel4Macro("GET.DOCUMENT(50)")

'For testing purposes, just the first 3 pages??
'uncomment the next line while testing
'TotalPages = 3

For pCtr = 1 To TotalPages
For xTimes = 1 To 6 '6 sheets or 3 sheets????
ActiveSheet.PrintOut _
Preview:=True, _
From:=pCtr, to:=pCtr
Next xTimes
Next pCtr

End Sub

Change the preview:=true to False when you're done testing.
 
Back
Top