View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Chip Pearson Chip Pearson is offline
external usenet poster
 
Posts: 7,247
Default Combobox and Textbox settings

Chris,

Change the Style property to 2, fmStyleDropDownList. You can do this at
design time or at run-time with code like

UserForm1.ComboBox1.Style = fmStyleDropDownList

This will prevent the user from change the value of the combobox to a value
that is not in the list.


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com
(email address is on the web site)


"Chris Gorham" wrote in message
...
hi,

what are the settings on a combobox to prevent the user editing entries
(the list of user names) that I've loaded using the "additem" method...if
he
does edit his user name then it confuses the VLookup statement that the
combobox feed
when it changes. I've tried every setting under combobox and nothing seems
to
prevent this.

I also require that the user type in his password into a text box when he
selects his user name from the combobox drop down. The text box for the
password has "Enter Password" loaded in to it when the combobox
changes...however it would be nice to have this text highlighted such that
when he types, he types immediately over it rather than having to delete
these words first.

again tried every setting for text boxes and used "set focus" to the text
box when the combo box changes...no luck...

thanks for your help...Chris