Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Through a VB program, I'd like to modify some data for all rows that have
been grouped together using the .group method. Is there a collection, object, or some other method that I can use to find the group and traverse through it? For example, I have the below code to group some rows: Dim xlWB As Excel.Application Dim rng As Range Set xlWB = AppInstance Set rng = xlWB.Rows("3:5") rng.Group At a later point in time, I want to go back through the group and modify some of the information programmatically. What options are available? thanks - jimm |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
jimm,
The built-in options look limited. The Range.OutlineLevel doesn't appear to be of any benefit. See if the following can get you started... '---------------------------- Sub GroupAndGrab() Dim rng As Range Dim lngN As Long Dim strArray() As String ReDim strArray(1 To 1000) Set rng = Range("B7:B9").EntireRow rng.Group strArray(rng.Row) = rng.Address Set rng = Rows("29:39") rng.Group strArray(rng.Row) = rng.Address 'do something else For lngN = 1 To 1000 If Len(strArray(lngN)) Then Set rng = Range(strArray(lngN)) rng.Font.Bold = True End If Next End Sub '---------------------------- Jim Cone San Francisco, USA http://www.realezsites.com/bus/primitivesoftware "jimm" wrote in message Through a VB program, I'd like to modify some data for all rows that have been grouped together using the .group method. Is there a collection, object, or some other method that I can use to find the group and traverse through it? For example, I have the below code to group some rows: Dim xlWB As Excel.Application Dim rng As Range Set xlWB = AppInstance Set rng = xlWB.Rows("3:5") rng.Group At a later point in time, I want to go back through the group and modify some of the information programmatically. What options are available? thanks - jimm |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Please post this thread a correct full method, method about | New Users to Excel | |||
Please post this thread a complete correct method, method about te | New Users to Excel | |||
GetObject method not work after Call Shell Method | Excel Programming | |||
Why QUIT method doesn't work after COPY method? | Excel Programming | |||
Group Method failed in macro | Excel Programming |