Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Datagrid and Col- RowContaining Error

Status
Not open for further replies.

poltergeist

Programmer
Jul 16, 2003
173
CL
I've a Datagrid and will capture the mousclick with col and rowcontaining, but the value of both metods are wrong.
Their is any parameter I have to switch on?
 
Private Sub DataGrid1_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
If Button = vbRightButton Then
MsgBox "Col Y" & Str(DataGrid1.ColContaining(Y)) & Chr(13) & _
"Row X" & Str(DataGrid1.RowContaining(X))
End If
End Sub

I've 13 columns and when i click in the last col the returning value is 9 what's the value for the actualy first col showed.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top