Aiysha
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 <-----------------------in valid 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.
Dim T1counter
Dim T2lcounter
T1 = 0
T2 = 0
Dim mycounter
For mycounter = 1 To MSFlexGrid1.Rows
MSFlexGrid1.row = mycounter <-----------------------in
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
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER