ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Setting the active printer (https://www.excelbanter.com/excel-programming/363268-setting-active-printer.html)

Boog

Setting the active printer
 
I recently posted this question but I believe my problem was misunderstood.
Here is the scenario (the printer names are simplified for ease of
explanation).

If I manually set "Printer A" as the default printer of my system and then
run the following code :

Private Sub CommandButton1_Click()
Application.ActivePrinter = "Printer B"
ActiveSheet.Printout
End Sub

The computer will print to Printer A, not Printer B. To print to Printer B,
I must go back and manually set 'Printer B' as the default.

In other words, the problem is not setting the ActivePrinter. The problem
is that changing Application. ActivePrinter does not seem to do anything.

BTW, I use the correct printer names. They were obtained by entering
?ActivePrinter in the immediate window.

Thank you in advance for any suggestions.

Boog


All times are GMT +1. The time now is 01:31 PM.

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