I have a userform with a combobox that I am populating with worksheet names. when the user selects a value from the combobox it will set a variable equal to the value of the combobox.
The problem comes when the user starts typing the value in the combobox as a short cut. If the user types in something that is not one of the choices then the program errors out on the set ws line.
I tried using
but it still errors out. Any suggestions on what I can do to prevent this from happening?
Code:
Private Sub item_Change()
Set ws = Worksheets(Me.item.Value)
icol = ws.Cells(10, Columns.count).End(xlToLeft).Offset(0, 1).Column
The problem comes when the user starts typing the value in the combobox as a short cut. If the user types in something that is not one of the choices then the program errors out on the set ws line.
I tried using
Code:
On Error Resume Next