Printing a number of pages with them numbered

M

mslabbe

Hi All!

I'm trying to come with a macro that will ask the user to select how many
copies of a sheet to print. The thing that are being printed are tags. I
would like to number themas the are printed.

Any suggestions?

Thanks in advance
 
N

NickHK

So you do not really want x copies of the same sheet; you want to print it x
times with changes ?
Depending how/where you are numbering the tags, amend this:

Private Sub CommandButton1_Click()
Dim PrintCount As Long
Dim i As Long

Const NUMBERSONLY As Long = 1

PrintCount = Application.InputBox("How many tags ?", "Print count", , , , ,
, NUMBERSONLY)

For i = 1 To PrintCount
With Worksheets(1)
.Range("A1").Value = i
'.PrintOut
End With
Next

End Sub

NickHK
 
M

mslabbe

Thanks NickHK...not exactly what I wanted, however it gave me some
ideas...this code that you gave did not print the numbers for some reason. I
had the user select the amount of copies, sent it to a range and then used
some this code and another one that I found on this site...this is such a
wonderful site!

Thanks again for your help

Sub PrintTag()
For i = 1 To Range("K5")
Sheets("Tag").Select

With Worksheets(1)
Range("K5").Value = i
ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True
End With
Next

End Sub
 

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

Top