Wilder1626
asked on
VB6 - Value like between 2 cells in MSHFlexgrid
Hi,
I have the below code that search a value from a specific column and row into another column and row in the same MSHFlexgrid:
What i'm trying to do if to update this part:
I want to say:
If MSHFlexGrid_rates.TextMatr ix(R, C) contains MSHFlexGrid_rates.TextMatr ix(1, 6) then
Ex:
If in MSHFlexGrid_rates.TextMatr ix(1, 6) i have the value: 1559 and in MSHFlexGrid_rates.TextMatr ix(R, C) i have a value: 1559.00 or 1559675, it would then put the cells in orange.
It is important to tell that the number of characters may vary in MSHFlexGrid_rates.TextMatr ix(1, 6).
How can i do that?
Thanks
I have the below code that search a value from a specific column and row into another column and row in the same MSHFlexgrid:
Dim C As Long
Dim R As Long
For C = 1 To MSHFlexGrid_rates.Cols - 1
If MSHFlexGrid_rates.TextMatrix(0, C) = MSHFlexGrid_rates.TextMatrix(1, 4) Then
For R = 1 To MSHFlexGrid_rates.Rows - 1
If Left(MSHFlexGrid_rates.TextMatrix(R, C), 2) = Left(MSHFlexGrid_rates.TextMatrix(1, 6), 2) Then
MSHFlexGrid_rates.Row = R
MSHFlexGrid_rates.Col = C
MSHFlexGrid_rates.CellBackColor = &H80FF&
End If
Next R
End If
Next C
What i'm trying to do if to update this part:
If Left(MSHFlexGrid_rates.TextMatrix(R, C), 2) = Left(MSHFlexGrid_rates.TextMatrix(1, 6), 2) Then
I want to say:
If MSHFlexGrid_rates.TextMatr
Ex:
If in MSHFlexGrid_rates.TextMatr
It is important to tell that the number of characters may vary in MSHFlexGrid_rates.TextMatr
How can i do that?
Thanks
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
As always, you're welcome and I'm glad I was able to help.
In my profile you'll find links to some articles I've written that may interest you.
Marty - MVP 2009 to 2014
In my profile you'll find links to some articles I've written that may interest you.
Marty - MVP 2009 to 2014
ASKER