Setting the active printer

B

Boog

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
 

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

Similar Threads


Top