VBA/Excel/Access/Word/Data Type Functions/CCur

Материал из VB Эксперт
Перейти к: навигация, поиск

CCur() converts value to Currency

 
Sub currencyDemo()
    Debug.Print CCur(10.3245567)
End Sub



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