Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Outline.ShowLevels

Hi all,
The code:
Worksheets("Sheet1").Outline.ShowLevels ColumnLevels:=2
Will expand or collapse grouped columns for a whole sheet,
but what code will expand or collapse only one group of
columns?

E.G. If I group Columns("E:G") and separately group Columns
("X:Z") how can I get some VB code to expand E:G without
expanding X:Z?

(I can't find anything other than this bit of code in
Excel's Help and I can't find anything by searching the
Microsoft knowledge base with this group of key words.)

Thanks in advance,
Kai Richmond
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,253
Default Outline.ShowLevels

Sub kicDemoOutline()

Rows(2).Resize(10).OutlineLevel = 3
Rows(5).OutlineLevel = 2

With ActiveSheet.Outline
.AutomaticStyles = False
.SummaryRow = xlAbove
.SummaryColumn = xlLeft
.ShowLevels 1
End With

Rows(5).ShowDetail = True
Rows(2).ShowDetail = True
End Sub

hth :)


keepITcool

< email : keepitcool chello nl (with @ and .)
< homepage: http://members.chello.nl/keepitcool


"KaiRich" wrote:

Hi all,
The code:
Worksheets("Sheet1").Outline.ShowLevels ColumnLevels:=2
Will expand or collapse grouped columns for a whole sheet,
but what code will expand or collapse only one group of
columns?

E.G. If I group Columns("E:G") and separately group Columns
("X:Z") how can I get some VB code to expand E:G without
expanding X:Z?

(I can't find anything other than this bit of code in
Excel's Help and I can't find anything by searching the
Microsoft knowledge base with this group of key words.)

Thanks in advance,
Kai Richmond


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Thanks

Hi,
Thanks for that - I'll give it a go.
It's hard to believe that between last night and this
morning (Australian time) my question got pushed back to
page 6!
Thanks again,
Kai Richmond

-----Original Message-----
Sub kicDemoOutline()

Rows(2).Resize(10).OutlineLevel = 3
Rows(5).OutlineLevel = 2

With ActiveSheet.Outline
.AutomaticStyles = False
.SummaryRow = xlAbove
.SummaryColumn = xlLeft
.ShowLevels 1
End With

Rows(5).ShowDetail = True
Rows(2).ShowDetail = True
End Sub

hth :)


keepITcool

< email : keepitcool chello nl (with @ and .)
< homepage: http://members.chello.nl/keepitcool


"KaiRich" wrote:

Hi all,
The code:
Worksheets("Sheet1").Outline.ShowLevels ColumnLevels:=2
Will expand or collapse grouped columns for a whole

sheet,
but what code will expand or collapse only one group of
columns?

E.G. If I group Columns("E:G") and separately group

Columns
("X:Z") how can I get some VB code to expand E:G

without
expanding X:Z?

(I can't find anything other than this bit of code in
Excel's Help and I can't find anything by searching the
Microsoft knowledge base with this group of key words.)

Thanks in advance,
Kai Richmond


.

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Outline Data robyn9002 Excel Discussion (Misc queries) 0 September 15th 09 12:25 PM
group and outline gonevertical Excel Discussion (Misc queries) 0 September 9th 09 12:02 AM
outline Vinaya Excel Worksheet Functions 2 June 22nd 06 08:01 PM
Protection with Outline jmenche Excel Discussion (Misc queries) 2 August 16th 05 01:09 PM
biography outline bjacob Excel Discussion (Misc queries) 0 August 8th 05 02:11 PM


All times are GMT +1. The time now is 11:27 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"