ipbr21054
Well-known Member
- Joined
- Nov 16, 2010
- Messages
- 5,726
- Office Version
- 2007
- Platform
- Windows
Hi,
I have copied a code from one worksheet to another as i would like to use the same but on another sheet.
The code is shown below & i have changed the cell ref to B7 & onwards.
My problem is that there are no names in the drop down list.
I go back & check the sheet i copied it from & that works great.
Not sure why they are not shown,would other codes on that sheet kill it etc ?
Thanks
I have copied a code from one worksheet to another as i would like to use the same but on another sheet.
The code is shown below & i have changed the cell ref to B7 & onwards.
My problem is that there are no names in the drop down list.
I go back & check the sheet i copied it from & that works great.
Not sure why they are not shown,would other codes on that sheet kill it etc ?
Thanks
Code:
Private Sub ComboBox1_Change() Dim r As Range
Set r = Range("B7", Range("B" & Rows.Count).End(xlUp)).SpecialCells(xlCellTypeVisible) _
.Find(ComboBox1.Value)
If Not r Is Nothing Then r.Select
ComboBox1.ListIndex = -1
End Sub