willastrowalker
New Member
- Joined
- Aug 28, 2015
- Messages
- 9
I've got this code, right, and I'm trying to have it run on speicific sheets only (that don't change). The code is just running 6 times on the same sheet.
The code is supposed to delete current outline, outline the page based on values in Column A/Row 1, and then show the outline to level 3 (out of 4).
The code is supposed to delete current outline, outline the page based on values in Column A/Row 1, and then show the outline to level 3 (out of 4).
Excel Formula:
Sub Allsheets()
Dim ws As Variant
Dim Matrixes As Variant
Matrixes = Array("Net (Receivables - Payables)", "Gross Due From (Payables)", "Gross Due To (Receivables)", "Receivables Net", "Payables Net", "Gross Due From (Receivables)", "Gross Due To (Payables)")
For Each ws In Matrixes
Cells.ClearOutline
OutlinePage
ActiveSheet.Outline.ShowLevels ColumnLevels:=3
ActiveSheet.Outline.ShowLevels RowLevels:=3
Next ws
Application.ScreenUpdating = True
Application.Calculation = xlCalculationManual
End Sub