Hi,
I have an excel workbook with around 50 tabs sandwiched in between a tab labelled 'start' and a tab labelled 'end'. The 50 tabs combined produce a single 50+ page report when saved as a pdf.
Within each of the 50 tabs there are rows/columns that I want to make sure are collapsed (grouped) prior to saving.
I basically need a single Excel macro that performs two actions:
Step 1
Group/Collapse relevant columns and rows between the 'start' and 'end' tabs
I've found the following VBA code below that works but only applies to a single active worksheet … not sure how to apply this to the workbook or specifically between the 'start' and 'end' tabs
Sub Collapse_All()
ActiveSheet.Outline.ShowLevels RowLevels:=1, ColumnLevels:=1
End Sub
Step 2
Select all the sheets between the 'Start' and 'End' tab and save as a single pdf file (this will be saved in the same folder location as the excel file)
I'm no good at writing macro's whatsoever, so I'm somebody could provide me with the code for a single macro that I can simply copy and paste it would be very much appreciated!!
Thank you in advance!!
I have an excel workbook with around 50 tabs sandwiched in between a tab labelled 'start' and a tab labelled 'end'. The 50 tabs combined produce a single 50+ page report when saved as a pdf.
Within each of the 50 tabs there are rows/columns that I want to make sure are collapsed (grouped) prior to saving.
I basically need a single Excel macro that performs two actions:
Step 1
Group/Collapse relevant columns and rows between the 'start' and 'end' tabs
I've found the following VBA code below that works but only applies to a single active worksheet … not sure how to apply this to the workbook or specifically between the 'start' and 'end' tabs
Sub Collapse_All()
ActiveSheet.Outline.ShowLevels RowLevels:=1, ColumnLevels:=1
End Sub
Step 2
Select all the sheets between the 'Start' and 'End' tab and save as a single pdf file (this will be saved in the same folder location as the excel file)
I'm no good at writing macro's whatsoever, so I'm somebody could provide me with the code for a single macro that I can simply copy and paste it would be very much appreciated!!
Thank you in advance!!