neilp
Well-known Member
- Joined
- Jul 5, 2004
- Messages
- 529
- Office Version
- 365
- Platform
- Windows
Hi All and thanks in advance for your help and wisdom
I am currently using the following code to change a label on a userform
It works great up to a point. When someone selects something in the dropdown, but then changes their mind and hits the backspace, it brings up a runtime error. Is there a bit of code I could add that would stop the code searching for a null value?
Thanks
Neil
I am currently using the following code to change a label on a userform
Code:
Private Sub Combobox2_Change()
Dim rw As Long
rw = Me.ComboBox2.ListIndex + 1
Me.Label23.Caption = Sheets("Data").Range("D" & rw).Value
End Sub
It works great up to a point. When someone selects something in the dropdown, but then changes their mind and hits the backspace, it brings up a runtime error. Is there a bit of code I could add that would stop the code searching for a null value?
Thanks
Neil