Sal Paradise
Well-known Member
- Joined
- Oct 23, 2006
- Messages
- 2,457
I have a UserForm Listbox Called 'PressLossList'. I have a change event for it that works just dandy (wrapped in Sub PressLossList_Change() tags). I also want to have a different event for if it's double-clicked. For that I use this code:
Any ideas?
Code:
Private Sub PressLossList_DoubleClick()
Dim c As Range
Dim TitleName As String
TitleName = Me.PressLossList.Value
With Worksheets("Opportunities").Range("$C:$C")
Set c = .Find(TitleName, , xlValues)
If Not c Is Nothing Then
Worksheets("Opportunities").Cells(c.Row, 1).EntireRow.Delete
End If
End With
End Sub
Any ideas?