View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Marc T Marc T is offline
external usenet poster
 
Posts: 25
Default Macro to print plus list options?

Thanks for that, works a treat!

Marc

"dmoney" wrote:

Application.Dialogs(xlDialogPageSetup).Show

"Marc T" wrote:

Hi,

I've used the following code in a worksheet to bring up a printer dialog box:

Sub PrintGraphs()

ActiveSheet.PageSetup.PrintArea = "$1:$79"
ActiveSheet.PageSetup.PaperSize = xlPaperA3


Dim ActPrinter As String
Dim Answer As Boolean

With Application
ActPrinter = .ActivePrinter
Answer = .Dialogs(xlDialogPrinterSetup).Show
End With

If Answer = False Then
Exit Sub
Else

ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True

End If

Application.ActivePrinter = ActPrinter


Is there any way to add the ability to show print options after selecting a
printer, such as paper size, portrait/landscape or number of copies?

Many thanks!
Marc