ipbr21054
Well-known Member
- Joined
- Nov 16, 2010
- Messages
- 5,832
- Office Version
- 2007
- Platform
- Windows
Afternoon.
I have a ComboBox on my userform which when i click the drop down arrow the names then shown are in order of A-Z & taken from my worksheet column B, "if i select a name from that list i am then taken to the person on the worksheet"
Now i would like to use the same code BUT without the part shown within the "" "" above.
This is the code.
My second ComboBox is called CustomerSearchBox2
Please can you advise how i should write it as whatever i do shows nothing when i click the drop down arrow.
Thanks.
Basically i am just looking for the list to appear in the order of A-Z & these names are taken from B8 & onwards.
I have a ComboBox on my userform which when i click the drop down arrow the names then shown are in order of A-Z & taken from my worksheet column B, "if i select a name from that list i am then taken to the person on the worksheet"
Now i would like to use the same code BUT without the part shown within the "" "" above.
This is the code.
Code:
Private Sub CustomerSearchBox_Change()'Modified 10/3/2018 5:51:42 AM EDT
Dim SearchString As String
Dim SearchRange As Range
SearchString = CustomerSearchBox.Value
Dim LastRow As Long
LastRow = Cells(Rows.Count, "B").End(xlUp).Row
Set SearchRange = Range("B8:B" & LastRow).Find(SearchString, LookIn:=xlValues, lookat:=xlWhole)
If SearchRange Is Nothing Then MsgBox SearchString & " Not Found": Exit Sub
SearchRange.Select
Unload Me
End Sub
My second ComboBox is called CustomerSearchBox2
Please can you advise how i should write it as whatever i do shows nothing when i click the drop down arrow.
Thanks.
Basically i am just looking for the list to appear in the order of A-Z & these names are taken from B8 & onwards.