wilg
01-23-2012, 05:50 PM
Hi, how do I highlight the activecell's value to hit delete to clear contents when combo box initializes?
I have this which initializes the combo box with the value but I want it to highlight so if I key delete it will clear the cell.
Private Sub UserForm_Initialize()
ComboBox1.RowSource = "COMPLETE_NAME"
With ComboBox1
.SelStart = 0
.SelLength = Len(ComboBox1)
End With
ComboBox1.Value = ActiveCell.Value
End Sub
I have this which initializes the combo box with the value but I want it to highlight so if I key delete it will clear the cell.
Private Sub UserForm_Initialize()
ComboBox1.RowSource = "COMPLETE_NAME"
With ComboBox1
.SelStart = 0
.SelLength = Len(ComboBox1)
End With
ComboBox1.Value = ActiveCell.Value
End Sub