Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

printing worksheets in VBA

Status
Not open for further replies.

bvraju12

Technical User
Apr 21, 2003
2
US
Hello:

I am a new user to VB and trying to work on one VBA and having some problem in printing worksheets.

In my application, I have total 7 worksheets.I have set the individual sheets for printing but I want to print all the worksheets(7) at a time with a single button click. So it would be great if anybody can give me a code to get this done.

Do I need to set the active printer for printing all this stuff.

Thanks in advance

Raj
 
This is what the macro recorder gave me - modify to suit

Sub PrintWorkbook()
ActiveWorkbook.PrintOut copies:=1, Collate:=True
End Sub

HTH
 
I had a similar problem which I solved with
Worksheets(Array("Sheet1", "Sheet2", "Sheet3")).PrintOut

All the commands are covered in excel help (or even pressing F1 when on it)... I think thats what you want
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top