Takamine334
asked on
How do you remove rows from an MSHFlexGrid?
by pressing a command button, how could you quickly remove 15 thousand rows from an MSHFlexGrid? The code I have now is quite slow:
For j = 1 To FlexGrid.rows - 1
If FlexGrid.Row <> 0 Then
FlexGrid.RemoveItem FlexGrid.Row
'J = J - 1
FlexGrid.Row = FlexGrid.Row - 1 '1
'+ 1 ' 1
End If
Next j
For j = 1 To FlexGrid.rows - 1
If FlexGrid.Row <> 0 Then
FlexGrid.RemoveItem FlexGrid.Row
'J = J - 1
FlexGrid.Row = FlexGrid.Row - 1 '1
'+ 1 ' 1
End If
Next j
Simply use .clear method of the flexgrid and add the number of rows that you want.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Takamine334 you should split the point with Sethi!
:-)
:-)
Good work.
Jorge
Jorge
LOL..He has split the point amongst you :-))