ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Printing a number of pages with them numbered (https://www.excelbanter.com/excel-programming/384882-printing-number-pages-them-numbered.html)

mslabbe

Printing a number of pages with them numbered
 
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

NickHK

Printing a number of pages with them numbered
 
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

"mslabbe" wrote in message
...
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




mslabbe

Printing a number of pages with them numbered
 
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


"NickHK" wrote:

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

"mslabbe" wrote in message
...
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






All times are GMT +1. The time now is 06:28 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com