Enable or Disable a combo box

Folks,
What the code to enable or disable a combo box used in Excel
Frank FreeseAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

N-WCommented:
Here's an example for you:
Private Sub TextBox1_Change()
    If TextBox1.Value = "Yes" Then
        ComboBox1.Enabled = False
    Else
        ComboBox1.Enabled = True
    End If
End Sub

Open in new window

0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Frank FreeseAuthor Commented:
thanks
0
Michael FowlerSolutions ConsultantCommented:
The option you probably want is enabled eg

ComboBox1.Enabled = False

Have a look at this link for some general information on ComboBoxes

http://office.microsoft.com/en-au/excel-help/add-a-list-box-or-combo-box-to-a-worksheet-HP010236681.aspx

if you are still having issues please give more details as to the type of control eg ActiveX or Form Control and what you are trying to do. A sample workbook would also greatly assist

Michael
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Excel

From novice to tech pro — start learning today.