怎么样获得datagrid控件当前单元格的值

解决方案 »

  1.   

    with me.datagrid1
      .col=1
      msgbox .text
      .col=2
      msgbox .text
    end with
      

  2.   

    为什么不用Spread控件!功能要比DataGrid强大得多!
    建议中...
      

  3.   

    Me.DataGrid1.Columns(列索引).CellText (Me.DataGrid1.GetBook(行代码))
      

  4.   

    参考
    http://community.csdn.net/Expert/topic/4249/4249097.xml?temp=.9923365
      

  5.   

    Dim r As Integer, c As Integer, s As String
    Private Sub DataGrid1_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
    If Button = 1 Then
    DataGrid1.Row = r
    DataGrid1.Col = c
    s = DataGrid1.Text
    End If
    End SubPrivate Sub DataGrid1_RowColChange(LastRow As Variant, ByVal LastCol As Integer)
    r = DataGrid1.Row
    c = DataGrid1.Col
    End Sub
      

  6.   

    Private Sub DataGrid1_RowColChange(LastRow As Variant, ByVal LastCol As Integer)
    r = DataGrid1.Row
    c = DataGrid1.Col
    End Sub
    为什么要这一段呀