I'm trying to unhide the next empty row and copy the list box value to column E with the following code. My code does unhide the rows but it does not copy the values. How could I overcome this?
Any help on this would be kindly appreciated.
Code: Select all
Private Sub Listbox1_DblClick(ByVal Cancel As MSForms.ReturnBoolean)
Dim r As Long
Dim C As String
For i = 18 To 53
If Range("A" & i).EntireRow.Hidden = True Then
If Range("A" & i).Value = "" Then
Range("A" & i).EntireRow.Hidden = False
Exit Sub
End If
End If
Next
If Range(E & 18) = "" Then
r = 18
Else
r = Range(E & 17).End(xlDown).Row + 1
End If
Range(E & r) = Me.Listbox1.Column(0)
End Sub