ipbr21054
Well-known Member
- Joined
- Nov 16, 2010
- Messages
- 5,738
- Office Version
- 2007
- Platform
- Windows
Morning all,
I have the working code supplied below.
How it works is i make a selection from the combobox & that person in question has its row highlighted & the cell in column A which is customers name is then selected.
What i would like to do now at this point is when i hit enter the userform opens & that customers entry is then shown.
The userform is called Database
If it helps when the userform opens the customers name is in the textbox called txtCustomer
Many thanks & have a nice Sunday.
I have the working code supplied below.
How it works is i make a selection from the combobox & that person in question has its row highlighted & the cell in column A which is customers name is then selected.
What i would like to do now at this point is when i hit enter the userform opens & that customers entry is then shown.
The userform is called Database
If it helps when the userform opens the customers name is in the textbox called txtCustomer
Code:
Private Sub combobox1_Change() Dim r As Range
Set r = Range("A5", Range("A" & Rows.Count).End(xlUp)).SpecialCells(xlCellTypeVisible) _
.Find(ComboBox1.Value)
If Not r Is Nothing Then r.Select
ComboBox1.ListIndex = -1
End Sub
Many thanks & have a nice Sunday.