I have make a macro and calculate subtotals. Until now I select manualy all active cells and print.
I want to run a macro and print automaticaly ,to the default printer, all active worksheet (max 3 pages).
I have make a macro and calculate subtotals. Until now I select manualy all active cells and print.
I want to run a macro and print automaticaly ,to the default printer, all active worksheet (max 3 pages).
Two choices. Slightly different outcomes for page numbering in headers/footers
[VBA]Sub Prints()
For i = 1 To Sheets.Count
Sheets(i).PrintOut
Next
End Sub
Sub Prints2()
Sheets(Array(1, 2, 3)).PrintOut
End Sub
[/VBA]
MVP (Excel 2008-2010)
Post a workbook with sample data and layout if you want a quicker solution.
To help indent your macros try Smart Indent
Please remember to mark threads 'Solved'
Maybe I have made a mistake! I meen to print only one worksheet. And (if it helps the max of pages will be 3 and the columns 5.
Thanks!
If you have set your PrintArea correctly then use
ActiveSheet.PrintOut
Recording a simple macro for such tasks will give you the basic code.
MVP (Excel 2008-2010)
Post a workbook with sample data and layout if you want a quicker solution.
To help indent your macros try Smart Indent
Please remember to mark threads 'Solved'