Format value as currency : Currency Format « Data Type « VBA / Excel / Access / Word






Format value as currency

 
Sub CCurDemo()
    Dim hours
    Dim hourlyPay
    Dim payPerWeek
    hours = 40
    hourlyPay = 20
    payPerWeek = CCur(hours * hourlyPay)
    MsgBox "Pay is:   " & Format(payPerWeek, "$##,##0.00"), , "Total Pay"

End Sub

 








Related examples in the same category

1.formatted proper currency format ("$###.##")
2.Format money as $##,##0.00