Cell Grouping with VBA

Pyromantic

Board Regular
Joined
Aug 9, 2006
Messages
58
I'm having a bit of problem with some code. The code perfoms 2 takens, deleting a bunch of sheets and minimising the cell group levels. When these actions are performed separately in differen't macros, they work just fine but as soon as i put them into the same peice of code, the macro bombs as soon as i try to minimise the groups.

Code:
Sub Macro4()
    Application.DisplayAlerts = False
    Sheets(Array("Introsheet", "Single Account Query", "Multi Account Query", _
        "Function Query", "COA", "ACL P&L", "Deptid", "Accounts", "Products", "Macros", _
        "Trial Balance")).Delete
    Sheets("P&L INPUT SHEET").Outline.ShowLevels RowLevels:=1
    Application.DisplayAlerts = True
End Sub

Thanks for reading
 

Some videos you may like

Excel Facts

Will the fill handle fill 1, 2, 3?
Yes! Type 1 in a cell. Hold down Ctrl while you drag the fill handle.

Watch MrExcel Video

Forum statistics

Threads
1,109,542
Messages
5,529,438
Members
409,877
Latest member
DDhol
Top