VBA/Excel/Access/Word/Date Functions/Currency Type

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


Sub curr()
    Dim ccyPrice As Currency
    ccyPrice = 19.99
End Sub

The Currency data type allows for positive and negative numbers with up to 15 digits to the left of the decimal point and 4 digits to the right of it

Sub Calculate_Weekly_Salary()
    Salary@ = InputBox("Enter your salary.", "Calculate Weekly Salary")
    WeeklySalary@ = Salary / 52
    MsgBox WeeklySalary
End Sub