How do I print a one page spreadsheet multiple time, each with i.

  • Thread starter Thread starter oshrat
  • Start date Start date
You might want to try this. I used the preview feature. You can use print.

There are may be techniques to setup one print call with new page numbers.
Option Explicit

Public Sub Printsheet()
Dim Counter As Integer
For Counter = 1 To 5
Call PrintSetup(Counter)
ActiveWindow.SelectedSheets.PrintPreview
Next Counter
End Sub

Sub PrintSetup(PageNumber As Integer)
With ActiveSheet.PageSetup
.PrintTitleRows = ""
.PrintTitleColumns = ""
End With
ActiveSheet.PageSetup.PrintArea = ""
With ActiveSheet.PageSetup
.LeftFooter = PageNumber
End With
End Sub
 
You can try out the below macro. If you are new to macros..

--Set the Security level to low/medium in (Tools|Macro|Security).
--From workbook launch VBE using short-key Alt+F11.
--From menu 'Insert' a module and paste the below code.
--Get back to Workbook.
--Run macro from Tools|Macro|Run <selected macro()>


Sub PrintMultiplewithFooterChange()
Dim intTemp As Integer
For intTemp = 1 To 50
ActiveSheet.PageSetup.CenterFooter = "Page " & intTemp & " of 50"
ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True
Next intTemp
End Sub
 
Back
Top