We help IT Professionals succeed at work.
Get Started

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

582 Views
Last Modified: 2012-05-09
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.....



Comment
Watch Question
Retired
CERTIFIED EXPERT
Top Expert 2012
Commented:
This problem has been solved!
Unlock 1 Answer and 2 Comments.
See Answer
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE