Ver Mensaje Individual
  #11 (permalink)  
Antiguo 01/11/2008, 11:53
principefreddy
 
Fecha de Ingreso: julio-2008
Mensajes: 205
Antigüedad: 15 años, 9 meses
Puntos: 1
Respuesta: ¿ayuda: Sumar columna de un dbgrid?

ya solucione una parte. coloque un datagrid

y cree un boton y un texto. aqui esta

Private Sub sumar_Click()
Dim I As Integer
Dim Val1 As Double
Dim Formato As String
txttotal.Text = " "
Formato = "###,####.00"
For I = 0 To DataGrid1.ApproxCount - 1
DataGrid1.Row = I
Val1 = Val1 + CDbl(DataGrid1.Columns(1))
Next I
txttotal.Text = Format(Val1, Formato)
End Sub