ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   How do I access the printer variable "number of copies"? (https://www.excelbanter.com/excel-worksheet-functions/243998-how-do-i-access-printer-variable-number-copies.html)

Hemetman

How do I access the printer variable "number of copies"?
 
I am trying to print numbered tickets on my printer.

Jacob Skaria

How do I access the printer variable "number of copies"?
 
You can try out the below macro. If you are new to macros..

--Set the Security level to low/medium in (Tools|Macro|Security).
--From workbook launch VBE using short-key Alt+F11.
--From menu 'Insert' a module and paste the below code.
--Get back to Workbook.
--Run macro from Tools|Macro|Run <selected macro()


--Format cell A1 as Text (Right clickFormatCellsselect Text)
--Cell A1 will hold the number. Change the cell reference to suit your
requirement.

Sub PrintMultiples()
Dim intTemp as Integer
For intTemp = 1 To 50
Range("A1") = Format(intTemp,"0000")
ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True
Next intTemp
End Sub


If this post helps click Yes
---------------
Jacob Skaria


"Hemetman" wrote:

I am trying to print numbered tickets on my printer.



All times are GMT +1. The time now is 05:34 AM.

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