ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Print 3 Worksheets (https://www.excelbanter.com/excel-programming/332367-print-3-worksheets.html)

Darin Kramer

Print 3 Worksheets
 


Hi there,

I need a macro to print three worksheets (say a, b, and c) within a
workbook...

Thanks guys!

D

*** Sent via Developersdex http://www.developersdex.com ***

Andy Wiggins[_6_]

Print 3 Worksheets
 
Use the macro recorder.

--
Andy Wiggins FCCA
www.BygSoftware.com
Excel, Access and VBA Consultancy
-

"Darin Kramer" wrote in message
...


Hi there,

I need a macro to print three worksheets (say a, b, and c) within a
workbook...

Thanks guys!

D

*** Sent via Developersdex http://www.developersdex.com ***




Darin Kramer

Print 3 Worksheets
 


Thanks - I was trying to write it in VBA, but Macro is easier. What I
had below wasnt working

Sub Print()
Dim ws As Worksheet
For Each ws In ActiveWorkbook.Worksheets
If ws.Name = "a" Then
ws.PrintOut Copies:=1, Collate:=True

End If
Next
End Sub


*** Sent via Developersdex http://www.developersdex.com ***

Ron de Bruin

Print 3 Worksheets
 
Use this

Sheets(Array("Sheet1", "Sheet", "Sheet3")).PrintOut


--
Regards Ron de Bruin
http://www.rondebruin.nl


"Darin Kramer" wrote in message ...


Thanks - I was trying to write it in VBA, but Macro is easier. What I
had below wasnt working

Sub Print()
Dim ws As Worksheet
For Each ws In ActiveWorkbook.Worksheets
If ws.Name = "a" Then
ws.PrintOut Copies:=1, Collate:=True

End If
Next
End Sub


*** Sent via Developersdex http://www.developersdex.com ***





All times are GMT +1. The time now is 08:20 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com