Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 17
Default Dynamically updating Combobox

In my form, I have a combobox which includes a list of names harvested
from several worksheets and allows the user to select one.
I'd like for the combobox to operate like this:
* Allows user to pick a name from the list (preferably with match first
letter option)
* Allows user to enter a name, and once done, add that to the combobox
list and sort it.

I find that the combobox_change event keeps firing, so I end up with a
list of partial names.
If I add "Roger" to the list, i'll also end up with "r", "ro", "rog" and
"roge" in the list.

Thanks, Darren.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Dynamically updating Combobox

Had the same problem today. Here is the example I used:

Private Sub ComboBox1_Change()
Dim strRange As String
If ComboBox1.ListIndex -1 Then
strRange = ComboBox1
Label2.Caption = strRange
strRange = Replace(strRange, " ", "_")
With ComboBox2
.RowSource = vbNullString
.RowSource = strRange
.ListIndex = 0
End With
Else
Label2.Caption = "Associated Items"
End If
End Sub

You have to select the first cell in a column and go to InsertNameDefine
in order to define what the name of your data is.



"Darren Hill" wrote:

In my form, I have a combobox which includes a list of names harvested
from several worksheets and allows the user to select one.
I'd like for the combobox to operate like this:
* Allows user to pick a name from the list (preferably with match first
letter option)
* Allows user to enter a name, and once done, add that to the combobox
list and sort it.

I find that the combobox_change event keeps firing, so I end up with a
list of partial names.
If I add "Roger" to the list, i'll also end up with "r", "ro", "rog" and
"roge" in the list.

Thanks, Darren.

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
Min & Max of a dynamically updating cell value Dave Excel Programming 2 May 24th 06 05:01 PM
dynamically lengthened combobox medicenpringles[_29_] Excel Programming 1 December 11th 05 09:11 AM
creating a combobox dynamically on an excel sheet gupt New Users to Excel 8 June 7th 05 04:07 AM
No replies, so again : How to add Combobox to cell dynamically? Abhinav[_3_] Excel Programming 2 May 17th 04 05:14 AM
Dynamically adding data to a Combobox? samanathon Excel Programming 4 April 5th 04 11:26 AM


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

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

About Us

"It's about Microsoft Excel"