I can't get the variable curRento to format in currency. Any ideas?
Private Sub Document_Open()
Dim strSite As String
Dim curRent As Currency
Dim intLen As Integer
ActiveDocument.Tables(2).Cell(1, 1).Range.Select
intLen = ActiveDocument.Tables(2).Rows.Count
Select Case intLen
Case 3
curRent = Val(ActiveDocument.Tables(2).Cell(2, 3).Range.Text) +
Val(ActiveDocument.Tables _(2).Cell(3, 2).Range.Text)
Case 4
curRent = Val(ActiveDocument.Tables(2).Cell(2, 3).Range.Text) +
Val(ActiveDocument.Tables _(2).Cell(3, 3).Range.Text) +
Val(ActiveDocument.Tables(2).Cell(4, 2).Range.Text)
Case 5
curRent = Val(ActiveDocument.Tables(2).Cell(2, 3).Range.Text) +
Val(ActiveDocument.Tables _(2).Cell(3, 3).Range.Text) +
Val(ActiveDocument.Tables(2).Cell(4, 3).Range.Text) + Val
_(ActiveDocument.Tables(2).Cell(5, 2).Range.Text)
Case 6
curRent = Val(ActiveDocument.Tables(2).Cell(2, 3).Range.Text) +
Val(ActiveDocument.Tables(2).Cell(3, 3).Range.Text) +
Val(ActiveDocument.Tables(2).Cell(4, 3).Range.Text) + Val
_(ActiveDocument.Tables(2).Cell(5, 3).Range.Text) +
Val(ActiveDocument.Tables(2).Cell(6, _ 2).Range.Text)
End Select
curRent = FormatCurrency(curRent, 2)
ActiveDocument.Tables(2).Cell(intLen, 2).Range.Text = curRento
ActiveDocument.Tables(1).Cell(1, 1).Range.Select
ActiveDocument.Tables(1).Cell(1, 2).Range.Text = curRento
End Sub
Doug Robbins - Word MVP - 11 Nov 2006 01:30 GMT
curRent = Format(curRent, "$#,###.00")

Signature
Hope this helps.
Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.
Doug Robbins - Word MVP
>I can't get the variable curRento to format in currency. Any ideas?
>
[quoted text clipped - 34 lines]
> ActiveDocument.Tables(1).Cell(1, 2).Range.Text = curRento
> End Sub
rub - 11 Nov 2006 13:22 GMT
thanks for your help
> curRent = Format(curRent, "$#,###.00")
>
[quoted text clipped - 44 lines]
> > ActiveDocument.Tables(1).Cell(1, 2).Range.Text = curRento
> > End Sub