I want to delete some rows from FLEXGRID , with MERGE some rows , (see figure )
I tried with routine below, but do not work
What is wrong ?
Code:Private Sub Deleta_Servicos() Dim LngStartRow As Long Dim lngEndRow As Long Dim icont As Long With Me.MSFlexGrid1 .ReDraw = False lngEndRow = Me.MSFlexGrid1.Row Do If lngEndRow = .Rows - 1 Then Exit Do If .TextMatrix(lngEndRow + 1, 0) = "" Then Exit Do lngEndRow = lngEndRow + 1 Loop LngStartRow = .Row Do If LngStartRow = .FixedRows Then Exit Do If .TextMatrix(LngStartRow - 1, 0) = "" Then Exit Do LngStartRow = LngStartRow - 1 Loop For icont = LngStartRow To lngEndRow + 1 MSFlexGrid1.RemoveItem icont Next .ReDraw = True End With End Sub![]()
Thanks


Reply With Quote
