Загрузка страницы

Excel VBA UserForm TextBox - How to format number

Excel VBA UserForm TextBox - Learn how to format number

The code used in this video:

Private Sub UserForm_Initialize()

Dim Price As Double
Price = 9

Dim Discount As Double
Discount = 0.25

Dim InStock As Integer
InStock = 1

'General Number-displays a number without thousand separators
txtPrice = Format(Price, "General Number")

'Standard - displays the thousand separators,
'at least one digit to the left of the decimal place,
'and two digits to the right of the decimal place
'txtPrice = Format(Price, "Standard")

'Fixed - displays at least one digit to the left of the decimal place
'and two digits to the right of the decimal place.
'txtPrice = Format(Price, "Fixed")

'txtPrice = Format(Price, "0.00")
'txtPrice = Format(Price, "#,##0.00")

'Currency - displays thousand separators
'two decimal places
'txtPrice = Format(Price, "Currency")
'txtPrice = Format(Price, "$#,##0.00")

'txtDiscount = Format(Discount, "Percent")
'txtDiscount = Format(Discount, "0.00%")

'txtInStock = Format(InStock, "Yes/No")
'txtInStock = Format(InStock, "True/False")
'txtInStock = Format(InStock, "On/Off")

End Sub

Видео Excel VBA UserForm TextBox - How to format number канала InAnOffice
Показать
Комментарии отсутствуют
Введите заголовок:

Введите адрес ссылки:

Введите адрес видео с YouTube:

Зарегистрируйтесь или войдите с
Информация о видео
6 января 2015 г. 2:18:22
00:05:55
Яндекс.Метрика