Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 336
Default create dynamic comboboxes


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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,565
Default create dynamic comboboxes


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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,049
Default create dynamic comboboxes


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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
dynamic create criteria? can this be done? Data Head Excel Worksheet Functions 0 January 27th 09 10:23 PM
How do I create Dynamic Dropdowns Baapi Excel Programming 1 March 8th 06 11:37 PM
How do I create a dynamic chart Nick Krill Charts and Charting in Excel 5 January 21st 06 08:25 PM
Can't create dynamic charts Brian Sells Charts and Charting in Excel 7 March 22nd 05 04:23 AM
create a dynamic Range() rbaldwin[_2_] Excel Programming 3 May 3rd 04 10:53 PM


All times are GMT +1. The time now is 01:26 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"