Expand/Collapse a Range of Columns

H

holt_greg

Hi,
I can get the sheet to expand/colapse, but want to be able to do it for
a specific range.

This is what works:
Sub ExpandColapse()
'Acts on Active Sheet

With ActiveSheet
' collapse all columns
.Outline.ShowLevels columnLevels:=1
' open first nest
.Outline.ShowLevels columnLevels:=2
' open second nest
.Outline.ShowLevels columnLevels:=3
End With

End Sub

I haven't been able to find anything that gets more specific than
modifying the Sheet.

thanks for any input.

bjoltus
 
J

Jonathan West

Hi bjoltus

You've posted to a group that deals with VBA in Word, not Excel You'll have
a better chance of an informed reply if you post to
microsoft.public.excel.programming

--
Regards
Jonathan West - Word MVP
www.intelligentdocuments.co.uk
Please reply to the newsgroup
Keep your VBA code safe, sign the ClassicVB petition www.classicvb.org
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top