Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 674
  • Last Modified:

combobox drop disable text input

Experts,

How can the text box of a combo box be disabled so a user can't type in information, but still have the user be able to access the drop down list.....combobox.enable, and combobox.lock lock off both the text and drop down menu....? Thanks
0
vbdvlper
Asked:
vbdvlper
  • 2
1 Solution
 
Joe_GriffithCommented:
set the style property to "2 - Dropdown List"
0
 
vbdvlperAuthor Commented:
Thanks,

Trying to be able to set the text property, just not have the user be able to set the text property?  with drop down list, the text property becomes invalid?

Is there a way to set the style property to 2 and still be able to set the combo box text property?
0
 
vbdvlperAuthor Commented:
Is there a way to disable the textbox part of the combo box from a user, but still be able to set the text property and the user to use the drop down?  Maybe this is difficult?
0
 
Erick37Commented:
Disable user input:

Private Sub Combo1_KeyPress(KeyAscii As Integer)
    KeyAscii = 0
End Sub
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now