hi all, I need to create function to lock them for typing new values.
I have that code On Key Down event, but how to build that as function
And then on load form to call that function, which should work for all comboboxes on that form.
Is that possible?
I have that code On Key Down event, but how to build that as function
Code:
Private Sub ComboBoxName_KeyDown(KeyCode As Integer, Shift As Integer)
Select Case KeyCode
Case vbKeyTab, vbKeyReturn, vbKeyDown, vbKeyUp
'Do nothing
Case Else
KeyCode = 0
MsgBox "You must select a value from the dropdown!" & vbNewLine & vbNewLine & " You cannot enter new data here!"
End Select
End Sub
Is that possible?