Hi anyone,
I'm using the following code to insert the list box content to the cells "I25:I33" and cells "K25:K33".
But the code inserts the listbox contents from I25 and onwards until the last row of the excel sheet.
How can I modify the code, so that when the user double clicks the list box; the double clicked row contents get copied to rows starting from I25:I33 and then to K25:K33.
Any help on this would be kindly appreciated.
Thanks in advance.
I'm using the following code to insert the list box content to the cells "I25:I33" and cells "K25:K33".
Code:
Private Sub ListBox1_DblClick(ByVal Cancel As MSForms.ReturnBoolean)
Dim r As Long
With Worksheets("MySheet")
If Range("I25") = "" Then
r = 25
Else
r = .Range("I24").End(xlDown).Row + 1
End If
.Range("I" & r) = Me.ListBox1.Column(1)
End With
End Sub
How can I modify the code, so that when the user double clicks the list box; the double clicked row contents get copied to rows starting from I25:I33 and then to K25:K33.
Any help on this would be kindly appreciated.
Thanks in advance.