Combobox list validation

A

Alberto Ast

I have a combobox with a list assigned with

For X = 16 To 30
ComboBox1.AddItem Sheets("Staff").Cells(1, X).Value
Next

but if user type something different it will take it

How do I force it to take only values from the preloaded list?
 
A

Alberto Ast

Thanks... it works but before I rate this post I have a question
what is the difference among below two options?

MatchRequired = true
or
Style = fmStyleDropDownList

p45cal said:
I have a combobox with a list assigned with

For X = 16 To 30
ComboBox1.AddItem Sheets("Staff").Cells(1, X).Value
Next

but if user type something different it will take it

How do I force it to take only values from the preloaded list?

Set its MatchRequired property to true. At run time by:
ComboBox1.MatchRequired = True
or at design time in the Properties pane for the combobox.


--
p45cal

*p45cal*
------------------------------------------------------------------------
p45cal's Profile: 558
View this thread: http://www.thecodecage.com/forumz/showthread.php?t=168491

Microsoft Office Help

.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top