Combo box control (1 Viewer)

GreenshootProgrammer

Registered User.
Local time
Today, 09:04
Joined
Jan 16, 2013
Messages
74
I want the user to be able to use a combo box to select a value but I don't want them to be able to manually enter data, is this possible?
 

missinglinq

AWF VIP
Local time
Today, 04:04
Joined
Jun 20, 2003
Messages
6,423
This code prevent the use, in a Combobox, of any keys except the Return, Tab, and Up and Down Arrow Keys:

Code:
Private Sub ComboBoxName_KeyDown(KeyCode As Integer, Shift As Integer)
 Select Case KeyCode
  Case vbKeyReturn, vbKeyTab, vbKeyUp, vbKeyDown
   KeyCode = KeyCode  'Accept these keys for Combobox usage
  Case Else
   KeyCode = 0   'Block all other keys
 End Select
End Sub
Just replace ComboBoxName with the actual name of your Combobox.

Linq ;0)>
 

Users who are viewing this thread

Top Bottom