PDA

Click to See Complete Forum and Search --> : DBgrid Problem in VB5


BillSteele
Dec 30th, 1999, 03:24 PM
I have a Grid .I have the data in it and I can output the Entire Record into variables
and use the data. What I want to do is assign a variable to a specific cell(box) when the user clicks on it and output it that way.
Help me please

RogerH
Dec 30th, 1999, 04:06 PM
Hi Bill,

see code below (from MSDN)


Private Sub DBGrid1_RowColChange(LastRow As Variant, ByVal LastCol As Integer)
' Print the Text, row, and column of the cell the user clicked.
Debug.Print DBGrid1.Text; DBGrid1.Row; DBGrid1.Col
End Sub


To assign variables to each cell you could create a 2-dim array that you access with row and col.

Happy New Year
Roger

BillSteele
Dec 30th, 1999, 05:22 PM
Excellent Roger : Thankyou

And a Happy new year to you too.