Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Fill combobox from specified range
I have a userform (userform1), with a combobox (combobox1) on it. When
start the userform from a sheet, the combobox should be filled with dat from range A&:A200 in the same sheet. No dublicates should be added. I have tried with the '.....userform1_initialize()', but nothing seem to happen. Can somebody give me the correct code. Thnks -- Message posted from http://www.ExcelForum.com |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Fill combobox from specified range
|
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Fill combobox from specified range
|
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Fill combobox from specified range
Private Sub UserForm_Initialize()
Dim num As Integer Dim CellText Dim Search num = 6 Do CellText = Range("A" & num).Value Set Search = Range("A5:A" & num - 1).Find(CellText LookIn:=xlValues) 'searches to see whether the text has shown up prior to curren position 'if it's not found, it returns 'Nothing' If Search Is Nothing Then ComboBox1.AddItem CellText End If num = num + 1 Loop Until num = 200 ' Range("a" & num).Value = "" <<Use if you wan it to go until the cell is blank End Sub -Gitcyphe -- Message posted from http://www.ExcelForum.com |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Fill combobox from specified range
|
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Fill a Combobox from a ROW? | Excel Discussion (Misc queries) | |||
fill combobox depending on selection from another combobox | Excel Discussion (Misc queries) | |||
Fill a combobox | Excel Programming | |||
ComboBox List Fill Range | Excel Programming | |||
Show one range in a combobox and write the 2nd range! | Excel Programming |