![]() |
Printing several worksheets
I have several workbooks with differently named worksheets. The one thing
they all have in common is that sheet no 1 is called "Formula" and the last one called "End". I'm looking for a macro to move between sheets and print them all between the first and the last sheet. Can anyone help? |
Printing several worksheets
Hi
This will print all of the sheets in an open workbook Sub printer() Dim ws As Worksheet For Each ws In ActiveWorkbook.Worksheets ws.PrintOut Next End Sub regards Paul On Feb 11, 7:40*am, fredrik wrote: I have several workbooks with differently named worksheets. The one thing they all have in common is that sheet no 1 is called "Formula" and the last one called "End". I'm looking for a macro to move between sheets and print them all between the first and the last sheet. Can anyone help? |
Printing several worksheets
Try this idea
Sub PrintSheetsByIndexSAS() fs = Sheets("formula").Index ls = Sheets("end").Index 'MsgBox fs 'MsgBox ls For i = fs To ls Sheets(i).PrintPreview Next i End Sub -- Don Guillett Microsoft MVP Excel SalesAid Software "fredrik" wrote in message ... I have several workbooks with differently named worksheets. The one thing they all have in common is that sheet no 1 is called "Formula" and the last one called "End". I'm looking for a macro to move between sheets and print them all between the first and the last sheet. Can anyone help? |
All times are GMT +1. The time now is 11:57 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com