VB Code:
Private Sub cmdtotal_Click() Dim MyTotal As Single Dim myTable As Table Dim myCel As Cell Set myTable = ActiveDocument.Tables(1) Dim i As Integer For i = 2 To myTable.Rows.Count '2 because you dont want to total the header Set myCel = myTable.Rows(i).Cells.Item(5) MyTotal = MyTotal + CSng(Replace(myCel.Range.Text, Chr(13) & Chr(7), "")) Next 'Just as an example of how to display the total. MsgBox "Total: " & MyTotal End Sub





Reply With Quote