Hi Mike and Kyle.
First thank you for answering back.
When something is typed in the, InSheet Combobox as e.g. the letter C, a dynamic search will show all the names containing the letter C.
- In column J, all the names containing the letter C, will have the number 1 - Everybody else the number 0
- In column K you can see there is 8 names containing the letter C.
- Column L is the dynamic part and all the names is listed in the first 8 cells from the top and this is what you see in the InSheet Combobox too.
If you after the C type the letter L, the search will now reduce the search to two possible names, containing those two letters - Claus Hansen, Claus Rydahl.
- In column K you can see the names is present in row 2 and 18.
- And in column L, the names is listed dynamic from the top.
In the menu, Formula - Name Management, you use a part of the code from M2 (With red below) in a new Name Management and call it InSheetDropDownList
='SHEETS1'!$L$2:INDEX('SHEETS1'!$L$2:$L$23;COUNT.IF('SHEETS1'!$L$2:$L$23;"*?"))
And then you use the Name Management InSheetDropDownList in the InSheet ComboBox
Private Sub ComboBox1_Change()
ComboBox1.ListFillRange = "InSheetDropDownList"
Me.ComboBox1.DropDown
End Sub
As you can see I had copied the codes from the columns J:M (with green) to the columns O:R (with yellow).
And then I use the O:R codes in the InUserform ComboBox.
I also made a new Name Management named InUserFormDropDownList and then I use this Name Management in the InUserform ComboBox too.
I do this to split the two CombomBoxes from each other in this test sheet.
My real problem is:
1) I miss some settings in the Userform Combobox properties, compared, which had been used in the InSheet Combobox properties.
2) I can't define the Userform Combobox to use the Name Management InUserformDropDownList
The Bug is the ListFillRange, (with red below) and I need to change that code for use in a Userform ComboBox.
Private Sub ComboBox1_Change()
Sheets(1).Select
Application.Goto "R2C3"
'*'Search & Find - Jump to the cell - Unnessesary.
Cells.Find(What:=UserForm1.ComboBox1.Value, After:=ActiveCell, LookIn:=xlFormulas, LookAt:= _
xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:=False _
, SearchFormat:=False).Activate
UserForm1.ComboBox1.ListFillRange = "InUserFormDropDownList"
Me.ComboBox1.DropDown
Call Module1.Update
End Sub
I had searched the net and the only codes i can find for a Userform ComboBox, referring to the Name Management, is Excel 2003/2007 codes and they doesn't work in my 2010 Excel.
I attached a new Test Sheet named B in the end and in this you can test the InUserformComboBox to see the Bug.
I really appreciate you help.
Thank you.
Ib
Bookmarks