Display data in a combo box
Hi Oggy,
Retaining the ListBox, add a CommandButton and the
following code:
'=============
Private Sub CommandButton1_Click()
Dim SH As Worksheet
Dim destRng As Range
Set SH = ThisWorkbook.Sheets("Sheet1") '<<=== CHANGE
Set destRng = SH.Range("A" & Rows.Count).End(xlUp)(2)
With Me.ListBox1
destRng.Value = .List(.ListIndex, 0)
destRng(1, 2).Value = .List(.ListIndex, 1)
destRng(1, 2).Value = .List(.ListIndex, 2)
End With
End Sub
'<<=============
---
Regards,
Norman
"Oggy" wrote in message
ups.com...
Hi Norman, You are brilliant, it works a treat. can this be done in a
combobox. What i am trying to achieve is search for a name (the
combobox lists as you enter the letters) and see the address on my
selection then upon selection enter it into excel speadsheet.
Sorry to be a pain, i owe you a drink
regards
Oggy
|