Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / February 2006

Tip: Looking for answers? Try searching our database.

Expand/Collapse a Range of Columns

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
holt_greg@hotmail.com - 17 Feb 2006 18:17 GMT
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
Jonathan West - 17 Feb 2006 18:51 GMT
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

Signature

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

> Hi,
> I can get the sheet to expand/colapse, but want to be able to do it for
[quoted text clipped - 21 lines]
>
> bjoltus
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.