Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Programming Outline Expand(+) / Collapse(-) Functionality

Use the "Group" method, row by row, or a entire range

for (int i = upperRowNumber; i <= lowerRowNumber; i++)
{
cellA = savedWorksheet.get_Range(string.Format("{0}{1}",
ACellName, i), Missing.Value);
cellB = savedWorksheet.get_Range(string.Format("{0}{1}",
BCellName, i), Missing.Value);

if (cellA.Value2 == null)
{
if (cellB.Value2 != null)
(savedWorksheet.Rows[i, Missing.Value] as Range).
Group(Missing.Value, Missing.Value,
Missing.Value, Missing.Value);
}
}
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
Expand Collapse Buttons Keith H[_2_] Excel Discussion (Misc queries) 0 April 17th 09 08:47 PM
Protect worksheet but expand and collapse outline? Trini_Suize Excel Discussion (Misc queries) 1 September 8th 08 11:57 PM
Programming Outlines (expand/collapse rows) in Excel [email protected] Excel Programming 0 January 17th 07 10:33 PM
Outline, expand or collapse via VBA Kevin McCartney Excel Programming 1 May 10th 06 04:31 PM
Expand and Collapse Columns JVICO New Users to Excel 1 April 21st 06 02:13 AM


All times are GMT +1. The time now is 09:26 AM.

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

About Us

"It's about Microsoft Excel"