Link to home
Start Free TrialLog in
Avatar of Wilder1626
Wilder1626Flag for Canada

asked on

VB6 - Compare MSHFlexgrid row 0 with TEXTbox

Hello all

I would like to validate from every cell of my MSHFlexgrid1 row 0 with every name entered in  my TEXT2 multiLine .

Ex:
If MSHFlexGrid1.TextMatrix(0, 0) is not equal to my TEXT1 1 row of Multiline, it would give me a msg saying that it does not match.

It would validate all cell of row 0 of the MSHFlexgrid1.

How can i do that?

Thanks again for your help

User generated image

This is what i have for now:
Private Sub rate999_Click()
    Dim lngCol As Long

    For lngCol = 0 To MSHFlexGrid1.Cols - 1
        If MSHFlexGrid1.TextMatrix(0, lngCol) = TEXT1 .Text Then
        Else
            Call MsgBox("Heather doesn't match. Please validate.", vbExclamation, "Heather Validation")
            Exit Sub
        End If
    Next
End Sub

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of Martin Liss
Martin Liss
Flag of United States of America 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 Wilder1626

ASKER

Thank you so much again. this is perfect.
You're welcome and I'm glad I was able to help.

Select the 'About Me' tab in my profile and you'll find links to some articles I've written that may interest you.
Marty - MVP 2009 to 2012