ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Choosing printer in a printing macro (https://www.excelbanter.com/excel-programming/333637-choosing-printer-printing-macro.html)

Werner[_18_]

Choosing printer in a printing macro
 

Hi,

In a printing macro, is it possible to implement an menu option t
choose the
printer (I have many printers)? If yes, any ideas how?

I quoted my macro.

Thx!

Werner



Sub PrintRows()

Dim lstRw As Long
Dim lstRwPlusTwo As Long
Dim Times As String

'Je détermine le nombre d'unités locatives à traiter.
Let lstRw = Sheets("Formulaire").Range("a65536").End(xlUp).Row
lstRwPlusTwo = lstRw + 2


Rows(1 & ":" & lstRwPlusTwo).Select

Times = InputBox("Entrez le nombre de copie à imprimer: ", "Copies t
Print",
1)

Selection.PrintOut Copies:=Times, Collate:=True


End Sub



--
Werne
-----------------------------------------------------------------------
Werner's Profile: http://www.excelforum.com/member.php...fo&userid=2430
View this thread: http://www.excelforum.com/showthread.php?threadid=38454


Werner[_19_]

Choosing printer in a printing macro
 

Someone gave me the answer :


Code
-------------------


Application.Dialogs(xlDialogPrinterSetup).Show


-------------------

--
Werne
-----------------------------------------------------------------------
Werner's Profile: http://www.excelforum.com/member.php...fo&userid=2430
View this thread: http://www.excelforum.com/showthread.php?threadid=38454



All times are GMT +1. The time now is 11:21 AM.

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