hi
can u plz let me know how to delete msflexgrid rows which are empty

Recommended Answers

All 2 Replies

Hi,

Check this Code:

Dim i As Integer
Dim j As Integer
Dim sSQL As String
For i= Grd.Rows-1 To 1 Step -1
  sSQL =""
  For j= 0 to Grd.Cols-1
     sSQL = sSQL & Trim(Grd.TextMatrix(i,j))
  NExt
  If Trim(sSQL) ="" Then
      Grd.RemoveItem i
  End if
  If Grd.rows<=1 Then Exit For
Next

Regards
Veena

Hi Veena

Thanks. Your code works beautifully.

I just replaced "Gird" with my control name.

Julian

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.