Use CCur to convert value to currecy : CCur « Data Type Functions « VBA / Excel / Access / Word






Use CCur to convert value to currecy

 

Sub CalcPay()
    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.CCur() converts value to Currency