Need Help converting this VBA working code so it'll work in vb.net
I guess .listindex, .columnCount, .boundColumn, .columnwidths, .additem, .list, .listcount syntax doesn't exist in vb.net or does it?
and
End Sub
Thanks again for everyone's help.
I guess .listindex, .columnCount, .boundColumn, .columnwidths, .additem, .list, .listcount syntax doesn't exist in vb.net or does it?
Code:
'Creates list of product
With CmbTieSize
.ColumnCount = 2
.BoundColumn = 2
.ColumnWidths = .Width - 2 & ";0" 'hide the 2nd column
.AddItem "FTB4"
.List(.ListCount - 1, 1) = "BLACK"
.AddItem "FTB6"
.List(.ListCount - 1, 1) = "BLUE"
.AddItem "FTY8"
.List(.ListCount - 1, 1) = "YELLOW"
.AddItem "FTG10"
.List(.ListCount - 1, 1) = "GREEN"
.AddItem "FTR12"
.List(.ListCount - 1, 1) = "RED"
.AddItem "FTB14"
.List(.ListCount - 1, 1) = "BROWN"
.AddItem "XT"
.List(.ListCount - 1, 1) = "ORANGE"
.AddItem "BLT"
.List(.ListCount - 1, 1) = "BLACK"
End With
Code:
'Enters Label color
Private Sub CmbTieSize_Change()
With CmbTieSize
If .ListIndex > -1 Then
LblTieColorDisplay.Caption = .Value
End If
End With
Thanks again for everyone's help.