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

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

Currency

   <source lang="vb">

Sub curr()

   Dim ccyPrice As Currency
   ccyPrice = 19.99

End Sub

</source>
   
  


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

   <source lang="vb">

Sub Calculate_Weekly_Salary()

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

End Sub

</source>