Link to home
Start Free TrialLog in
Avatar of jazjef
jazjef

asked on

How do I add consecutive items to a MSFlexGrid using VB6?

I'm using VB6---This code will add an item to row 1 column 1 of the flexgrid... how do I add other items in this same column but always in the next row down.

Dim i As Integer
   
    For i = 0 To i
        If Not MSFlexGrid1.TextMatrix(i, 1) > "" Then
           MSFlexGrid1.TextMatrix(i + 1, 1) = Text1.Text
        End If
    Next i

Here's what I get right now in column 1 row 1 when I put a color into Text1 and click my button:

Red

Here's what I want in column 1 row i each time I enter a color in Text1 and click the button:

Red
Blue
Orange
Yellow
Blue
Green
Red

...... and so on......

Thanks for any help.....



ASKER CERTIFIED SOLUTION
Avatar of GrahamSkan
GrahamSkan
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of jazjef
jazjef

ASKER

Thanks for the help GrahamSkan....works like a charm.