Solved

combobox drop disable text input

Posted on 2000-03-09
4
657 Views
Last Modified: 2008-02-01
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
Comment
Question by:vbdvlper
  • 2
4 Comments
 
LVL 7

Expert Comment

by:Joe_Griffith
ID: 2601054
set the style property to "2 - Dropdown List"
0
 

Author Comment

by:vbdvlper
ID: 2601103
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
 

Author Comment

by:vbdvlper
ID: 2601155
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
 
LVL 32

Accepted Solution

by:
Erick37 earned 20 total points
ID: 2601225
Disable user input:

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

Featured Post

Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question