View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.misc
Le Jurassien Le Jurassien is offline
external usenet poster
 
Posts: 6
Default Macro that add several worksheets and set the print out to legal s

Hello,

How do I change my code so that any worksheets within the workbook opened to
print in legal size? Currently, I have to run my macro on every worksheet so
this does not seem to save me time.

Also, I would like to know how can set a unique command that will
automatically run the macro on any workbook opened without me going to Tool
- macro - then run.

My intent is to have a macro that add new worksheets and set the size of
the print out to landscape legal format.
Please help!

Public Sub AddAWorbook()
Worksheets.Add

End Sub
Public Sub PageSet()

With ActiveSheet.PageSetup
.Orientation = xlLandscape
.PaperSize = xlPaperLegal
.FirstPageNumber = xlAutomatic
.CenterHeader = " "
.Zoom = 100
.PrintErrors = xlPrintErrorsDisplayed

End With
End Sub