Print Macro

M

Mike B

I am trying to make a print macro that will automatically print in landscape
mode. This macro will be specific to one sheet only. I have tried this

Sub printactivepage()
Application.Dialogs(xlDialogPageSetup).Show
End Sub

and the options show fine, but when I click OK it will not print. Also, I do
not want any kind of option box to show, only to go strait to print in
landscape. Please note that I am very new to VBA and macros so any help would
be greatly appreciated. Thank you!
 
J

JLGWhiz

You will have to use the PrintOut command to get it to print. It will not
print from the dialog box when called from code. This is by design from
Microsoft.
 

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