I'm using the following code to write the value of the selected item of a list box to a specific cell. That works OK. After the value is written to the cell, I need to disable the list box and un-select the the selected item.
However, the listbox is still enabled, and I simply don't know how to unselect the selected item.
Any suggestions?
Private Sub lstProductID_Click()
Cells(Rows.Count, "A").End(xlUp).Select
Selection.Offset(1, 0) = Left(Sheets("Entry").lstProductID.Value, 3)
Cells(Rows.Count, "A").End(xlUp).Select
'lstProductID.Selected = "False"
lstProductID.Enabled = "false"
lstType.Enabled = "true"
End Sub
However, the listbox is still enabled, and I simply don't know how to unselect the selected item.
Any suggestions?
Private Sub lstProductID_Click()
Cells(Rows.Count, "A").End(xlUp).Select
Selection.Offset(1, 0) = Left(Sheets("Entry").lstProductID.Value, 3)
Cells(Rows.Count, "A").End(xlUp).Select
'lstProductID.Selected = "False"
lstProductID.Enabled = "false"
lstType.Enabled = "true"
End Sub