Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Is it possible to allow a user to enter a "not list" item into a VB userform
combobox? I found this website saying that there are three types of comboboxes: http://www.vb6.us/tutorials/visual-b...o-box-tutorial It says that a type 0 combobox allows a user to enter values in the textbox portion of the combobox. Is this correct and how do I code the combobox to allow this? |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
You can change the .Style property of the combobox.
Open the VBE Select your userform Select the Combobox Hit F4 to see the properties window Scroll down to the Style property and choose the one you want. But you'll only see two styles in VBA. It's different from VB. ======= In code you could use: Option Explicit Private Sub UserForm_Initialize() Me.ComboBox1.Style = fmStyleDropDownCombo 'or Me.ComboBox1.Style = fmStyleDropDownList End Sub aftamath77 wrote: Is it possible to allow a user to enter a "not list" item into a VB userform combobox? I found this website saying that there are three types of comboboxes: http://www.vb6.us/tutorials/visual-b...o-box-tutorial It says that a type 0 combobox allows a user to enter values in the textbox portion of the combobox. Is this correct and how do I code the combobox to allow this? -- Dave Peterson |
#3
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Hi, I wanted to rebump this question because I had a similar situation. I'm
sort of new to Excel VBA so please bear with me. I have a combobox that lists client names. I have it filled via RowSource to a named range (called "CLIENT_NAMES"). I want my users to be able to choose client names from the combobox, however, if they have a new client, I want them to be able to just type in the new client's name and have that added to my named range. Aside from convoluted coding to read the value of the combobox, and then using if/then statements to add it to my range, is there a more direct, built-in method that I can do this? Or will I have to do a lot of coding just to add this feature? (If so I will just give my users a textbox instead and do my adding on the excel side rather than the VBA side.) Thanks in advance! Susan "Dave Peterson" wrote: You can change the .Style property of the combobox. Open the VBE Select your userform Select the Combobox Hit F4 to see the properties window Scroll down to the Style property and choose the one you want. But you'll only see two styles in VBA. It's different from VB. ======= In code you could use: Option Explicit Private Sub UserForm_Initialize() Me.ComboBox1.Style = fmStyleDropDownCombo 'or Me.ComboBox1.Style = fmStyleDropDownList End Sub aftamath77 wrote: Is it possible to allow a user to enter a "not list" item into a VB userform combobox? I found this website saying that there are three types of comboboxes: http://www.vb6.us/tutorials/visual-b...o-box-tutorial It says that a type 0 combobox allows a user to enter values in the textbox portion of the combobox. Is this correct and how do I code the combobox to allow this? -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
fill combobox depending on selection from another combobox | Excel Discussion (Misc queries) | |||
help on spinbutton controllinng a text or ComboBox showing time | Excel Discussion (Misc queries) | |||
combobox text size | Excel Discussion (Misc queries) | |||
How do i populate a text box according to selection in combobox? | Excel Worksheet Functions | |||
Select Text Files from Combobox | Excel Discussion (Misc queries) |