Solved

combobox drop disable text input

Posted on 2000-03-09
4
655 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Access 2003, my txt file export is running backwards 4 46
Visual Basic Excel Formatting error 4 81
Determine Range to Select 5 42
Problem to With line 4 37
Introduction I needed to skip over some file processing within a For...Next loop in some old production code and wished that VB (classic) had a statement that would drop down to the end of the current iteration, bypassing the statements that were c…
Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
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…

932 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

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now