Code: Select all
Private Sub ListBox1_DblClick(ByVal Cancel As MSForms.ReturnBoolean)
Dim oCell As Range
' Search for the word 'BLUE'
Set oCell = Worksheets("Sales").Range("A:A").Find(What:="Apple", LookAt:=xlWhole)
If oCell Is Nothing Then
MsgBox "The word 'Apple' was not found in column A", vbExclamation
Exit Sub
End If
' Insert row below the cell with the word 'BLUE'
oCell.Offset(1, 0).EntireRow.Insert
' Fill cell in column A
oCell.Offset(1, 0) = Me.ListBox1.Column(1)
End Sub