Print page

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?
 
F

Frank Kabel

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
 
P

pikus

Sheets(1).PrintOut

or
Sheets("Sheet1").PrintOut

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

- Piku
 
Top