macro to select all sheets between two "bookends" and print them

gotmike

New Member
Joined
Jan 27, 2014
Messages
4
i have a workbook with a "roll-up" page that shows the results of all sheets between two "bookends"

for instance:

Tab/Sheet NamePurpose
Portfolioroll-up of all sheets between "<--" and "-->"
<--first bookend
Analysis 1individual analysis
Analysis 2individual analysis
-->end bookend
TEMPLATEtemplate to create individual analysis sheets, users basically copy this tab between the bookends to add additional analyses to the portfolio.

<tbody>
</tbody>

i want to print all tabs EXCEPT the bookends and the TEMPLATE tabs.

i currently have something like this:

Code:
Sub PrintAll()'
' PrintAll Macro
' Macro to print all relevant sheets...
'


'
    Sheets(Array("Portfolio", "<-", "Analysis 1", "Analysis 2", "->")).Select
    ActiveWorkbook.PrintOut Copies:=1, Collate:=True, IgnorePrintAreas:=False
End Sub
obviously, that won't work if the sheet names change.

is there a way to specify the "start" and "end" as a range here for selection?

another way to skin the cat might be to create a named range that uses a start/end but i'm not sure that's possible either.
 

Forum statistics

Threads
1,081,518
Messages
5,359,237
Members
400,523
Latest member
ExcelNewbie98

Some videos you may like

This Week's Hot Topics

  • VBA (Userform)
    Hi All, I just would like to know why my code isn't working. Here is my VBA code: [CODE=vba]Private Sub OKButton_Click() Dim i As Integer...
  • List box that changes fill color
    Hello, I have gone through so many pages trying to figure this out. I have a 2020 calendar that depending on the day needs to have a certain...
  • Remove duplicates and retain one. Cross-linked cases
    Hi all I ran out of google keywords to use and still couldn't find a reference how to achieve the results of a single count. It would be great if...
  • VBA Copy and Paste With Duplicates
    Hello All, I'm in need of some input. My VBA skills are sub-par at best. I've assembled this code from basic research and it works but is...
  • Macro
    is it possible for a macro to run if the active cell value is different to the value above it
  • IF DATE and TIME
    I currently use this to check if date has passed but i also need to set a time on it too. Is it possible? [CODE=vba]=IF(B:B>TODAY(),"Not...
Top