LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 12
Default Dynamically adding data to a Combobox?

samanathon wrote in message ...
OK,

It didn't work, but let me specify a bit:

My worksheet has two userforms: Show_Information & Add_Airline.

Show_Information(userform) has: Airlines(combobox)

Add_Airline(userform) has Add_Airline(textbox) and Add_Airline(button)

So, the user wants to add a new airline to the Airlines(combobox). They
would click a button to load the Add_Airline(userform), enter info into
Add_Airline(textbox) and click Add_Airline(button).

Now, the new info has been entered into Airlines(combobox) on the
Add_Airline(userform).

Any ideas?


---
Message posted from http://www.ExcelForum.com/


In your Add_Airline userform, put the following click event for the
Add_Airline command button:

Private Sub cmdAdd_Airline_Click()
If txtAdd_Airline.Text < "" Then
Show_Information.cboAirlines.AddItem txtAdd_Airline.Text
txtAdd_Airline.Text = ""
txtAdd_Airline.SetFocus
End Sub


If you want to persist the airlines you will have to store them in a
sheet somewhere and initialize the combobox items with the existing
airlines.


 
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
Dynamically Adding Textbox To Frame sarndt Excel Worksheet Functions 0 March 15th 10 06:19 PM
creating a combobox dynamically on an excel sheet gupt New Users to Excel 8 June 7th 05 04:07 AM
Emergency ( Adding Worksheets dynamically in Workbookds) Ussiddiqui[_3_] Excel Programming 3 January 27th 04 06:45 PM
Program a combobox/dropdownlist to create textboxes dynamically ed Excel Programming 0 October 30th 03 09:02 PM
Adding button dynamically lagodch Excel Programming 1 October 7th 03 10:14 PM


All times are GMT +1. The time now is 02:34 PM.

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"