MSFlexGrid MouseUp

I need to know how to determine the current row when a user right click's on a cell to bring up a pop up menu.

Currently I am using the "MouseUp" function and tried returning the row with ".row", but it doesn't return the current row.

Thank you for your help.
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

You can use mouseRow as a read only property. You can also use MouseCol to
get the col value. It will point to currently clickeed cell coordinates.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Try this:

Private Sub MSFlexGrid1_MouseUp(Button As Integer, _
        Shift As Integer, x As Single, y As Single)
    Dim i As Integer
    With MSFlexGrid1
    For i = 0 To .Rows - 1
        If y < .RowPos(i) Then Exit For
    End With
    Debug.Print "Clicked on row " & Val(i - 1)
End Sub
Ah yes, the MouseRow property! Much better.
ckosloskiAuthor Commented:
The MouseRow property worked great!!!  Enjoy your points.
Thanks and have a great happy new year.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic Classic

From novice to tech pro — start learning today.