View Single Post
  #3 (permalink)  
Old 06-14-2009, 2:17 PM
ggunter ggunter is offline
VB.NET Forum Enthusiast
.NET Framework: .NET 2.0 (VS 2005)
 
Join Date: Apr 2008
Posts: 84
Reputation: 33
ggunter is on a distinguished programming path ahead
Default

Not really sure if this is what you are looking for but here's what I use. Only ran it on a few simple test but seemed to work ok.

Code:
Public Sub GroupRows(ByVal firstRow As Integer, ByVal lastRow As Integer)

    'select the rows you wish to group
    xlsRange = xlsApp.Range(firstRow.ToString & ":" & lastRow.ToString)
    xlsRange.Rows.Select()

    'group the rows
    xlsRange.Rows.Group()

End Sub
Reply With Quote