Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Hello, is it possible to create dynamic combo boxes? I have an userform which saves the file into a specified folder. The user can choose one out of 4 predefined folders from a combobox. I want to add a button "Add folder", by what the user can enter the path and the folder would appear in the comobbox. The users are not proficient to fill the combobox via VBA and I want them to be able to add folders without proggramming. thank you Martin |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() If the combobox is populated using RowSource, then the code behind the command button would have to resize the row source range and add the new folder to the rowsource range. If the combobox is populated during the initialize event using the add item method, then the command button code can use the add item method to add the new folder to the combo box list as below. Private Sub CommandButton1_Click() ComboBox1.AddItem Selection End Sub This assumes the user will have typed a new folder name into a cell and then selects that cell. |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() if you have a text box above the listbox, and a button next to at , your user can tyep the address in the textbox then click the button the button's click event should be listbox1.AddItem Textbox1.text ' these next two are optional textbox1.text="" listbox1.listindex = listbox1.listcount-1 ' this clears the textbox and highlights the last row of the listbox. this though is akin to clicking the list box ...so don't use this if you're trapping the listbox click event "Martin" wrote in message ... Hello, is it possible to create dynamic combo boxes? I have an userform which saves the file into a specified folder. The user can choose one out of 4 predefined folders from a combobox. I want to add a button "Add folder", by what the user can enter the path and the folder would appear in the comobbox. The users are not proficient to fill the combobox via VBA and I want them to be able to add folders without proggramming. thank you Martin |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
dynamic create criteria? can this be done? | Excel Worksheet Functions | |||
How do I create Dynamic Dropdowns | Excel Programming | |||
How do I create a dynamic chart | Charts and Charting in Excel | |||
Can't create dynamic charts | Charts and Charting in Excel | |||
create a dynamic Range() | Excel Programming |