Simply you like to add rows and columns means you can use below code otherwise explain clearly what is ur need.

Private Sub Command1_Click()
     MSFlexGrid1.Rows = 4
     MSFlexGrid1.Cols = 6
End Sub


How can add 4 rows and 6 columns into MsFlexGrid1 with Command_click event in VB6?

Ok we have done it. Now, code below adds rows and columns but, they are all empty. I want to add "Hello" into all cells. How do i do that?

I just want to populate the msflix. That's all.

Dim row, column, x, y
    row = Adodc1.Recordset.RecordCount
    column = Adodc1.Recordset.Fields.Count
    For x = 0 To row
        MSFlexGrid1.Rows = x
            For y = 0 To column
                MSFlexGrid1.Cols = y
            Next y
    Next x


Done it. Example

Dim rst As ADODB.Recordset
    Set rst = New ADODB.Recordset
    rst.CursorLocation = adUseClient
    rst.Open "Select * from u_translations", Adodc1.ConnectionString, adOpenStatic, adLockReadOnly
    With MSFlexGrid1
        .Rows = rst.RecordCount + 1
        .Cols = rst.Fields.Count + 1
        .Row = 1
        .Col = 1
        .RowSel = .Rows - 1
        .ColSel = .Cols - 1
        .Clip = rst.GetString(adClipString)
    End With
    Set rst = Nothing
This question has already been answered. Start a new discussion instead.