Print page

  • Thread starter Thread starter Jez
  • Start date Start date
J

Jez

I've set my page breaks and want a button to print
ceratin pages. How do I write this in the vba editor?
 
Hi
try something like
sub foo()
activesheet.printout from:=1, to:=3
end sub

and assign a button to this. You can replace the 'from' and 'to' number
with a variable
 
Sheets(1).PrintOut

or
Sheets("Sheet1").PrintOut

or
For x = 1 To 3
Sheets(x).PrintOut
Next x

- Piku
 
Back
Top