Link to home
Start Free TrialLog in
Avatar of Aiysha
AiyshaFlag for United States of America

asked on

counting cells in mshflexgrid with cell's color (invalid row error)

I get invalid row error in the line below.Please help

Dim T1counter
Dim T2lcounter
T1 = 0
T2 = 0

Dim mycounter
For mycounter = 1 To MSFlexGrid1.Rows
    MSFlexGrid1.row = mycounter  <-----------------------invalid Row value error?
    MSFlexGrid1.col = 5
If MSFlexGrid1.CellForeColor = vbCyan Then
 If MSFlexGrid1.Text = "T1" Then
   T1 = T1 + 1
 End If
 If MSFlexGrid1.Text = "T2" Then
   T2 = T2 + 1
 End If
End If

Next mycounter


Thank you.
ASKER CERTIFIED SOLUTION
Avatar of Brian Mulder
Brian Mulder
Flag of Netherlands 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 Aiysha

ASKER

it works fine thank you.