Thread: Print Macro
View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
JLGWhiz JLGWhiz is offline
external usenet poster
 
Posts: 3,986
Default Print Macro

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.

"Mike B" wrote:

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!