Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 50
Default Referring to column or row grouping using VB

I have a combination of column & row groupings that I've created on a
worksheet using the Data Group/Ungroup function. When running certain
macros, I want to either expand or collapse these groupings based on my
needs. I cannot figure out how to reference these groupings within my VB
code to ensure the proper rows/columns are hidden/unhidden as necessary. For
example, assuming I have two 'levels' within my column groupings. If I want
to see all columns, I manually select the "1" in my column outline grid to
expand all columns. If I want to hide the secondary columns, I click the "2"
and these columns are hidden. I want to simulate this action using VB. Is
there any way to do this?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 57
Default Referring to column or row grouping using VB

ActiveSheet.Outline.ShowLevels RowLevels:=2, ColumnLevels:=2
The above code expands all groupings....conversely
ActiveSheet.Outline.ShowLevels RowLevels:=1, ColumnLevels:=1
the above code collapses all groupings.
--
Thanks,
PTweety


"jday" wrote:

I have a combination of column & row groupings that I've created on a
worksheet using the Data Group/Ungroup function. When running certain
macros, I want to either expand or collapse these groupings based on my
needs. I cannot figure out how to reference these groupings within my VB
code to ensure the proper rows/columns are hidden/unhidden as necessary. For
example, assuming I have two 'levels' within my column groupings. If I want
to see all columns, I manually select the "1" in my column outline grid to
expand all columns. If I want to hide the secondary columns, I click the "2"
and these columns are hidden. I want to simulate this action using VB. Is
there any way to do this?

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
Referring to a portion of a column LewisM Excel Discussion (Misc queries) 1 May 28th 10 12:13 AM
Referring to a row or column Nick London Excel Programming 1 July 4th 06 09:23 AM
Referring to a column Hru48 Excel Discussion (Misc queries) 1 January 31st 06 05:59 PM
Referring to a column Mike D. Excel Programming 1 March 1st 05 03:54 PM
Referring to a column Helen Excel Programming 3 May 10th 04 02:40 PM


All times are GMT +1. The time now is 07:23 AM.

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"