The ItemData property can only store Integers. One option is to multiply the value by 100 when it is stored and obviously divide by 100 when the value is retrieved.
Code:Option Explicit Private Sub Form_Load() Dim sngValue As Single sngValue = 1.98 Combo1.AddItem "A new service" Combo1.ItemData(0) = sngValue * 100 Combo1.ListIndex = 0 End Sub Private Sub Combo1_Click() Label1.Caption = FormatCurrency(Combo1.ItemData(0) / 100, 2) End Sub




Reply With Quote