Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

force user to only pick from list

Status
Not open for further replies.

kimprogrammer

Programmer
Sep 15, 2008
160
CA
Hello
I created a combobox and loaded it at runtime

Dim cbominsvalues() As String = {"00", "15", "30", "45"}
Me.cboAdjMin1(x).Items.AddRange(cbominsvalues)

I need it so the user can only select from the list and not enter anything else

What is the property to do this? I tried a few properties but have not gotten it yet.

Thanks for the help
Kim
 
It's the DropDownStyle property. In code:

ComboBox1.DropDownStyle = ComboBoxStyle.DropDownList

I used to rock and roll every night and party every day. Then it was every other day. Now I'm lucky if I can find 30 minutes a week in which to get funky. - Homer Simpson

Arrrr, mateys! Ye needs ta be preparin' yerselves fer Talk Like a Pirate Day!
 
Code:
cmbstate.DropDownStyle = ComboBoxStyle.DropDownList

--------------------------------------------------
"...and did we give up when the Germans bombed Pearl Harbor? NO!"

"Don't stop him. He's roll'n."
--------------------------------------------------
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top