recording a macro

L

Life Fitness

When I record a macro to change printer properties there
is no code written in the editor. What am I doing wrong.
 
F

Frank Kabel

Hi
you can't manipulate these settings directly with VBA. One workaround
would be to use Sendkeys within your macro
 
L

Life Fitness

I don't know how to do that. Can you offer some sample
code where I can change the printer names?
 
G

Gord Dibben

If all you want to do is change printers, the macro recorder will record that.

Sub Macro1()
Application.ActivePrinter = "HP DeskJet 1200C/PS on LPT1:"
End Sub

Sub Macro2()
Application.ActivePrinter = "Epson Stylus COLOR 800 ESC/P 2 on LPT1:"
End Sub

For more Properties and Options, Frank's sendkeys is the way to go.

For Help on Sendkeys.........

Hit ALT + F11 to get to Visual Basic Editor.

Help>Answer Wizard "sendkeys". Choose Sendkeys Method from results.

Gord Dibben Excel MVP
 

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

Top