Hello. How do I modify the code to leave a blank row between each row with values when copying to an Excel sheet
VBA Code:
Dim i As Long
With ListBox5
ReDim a(0 To .ListCount - 1, 1 To 12)
For i = 0 To .ListCount - 1
a(i, 1) = .List(i, 0)
a(i, 2) = .List(i, 1)
a(i, 3) = .List(i, 3)
a(i, 4) = .List(i, 4)
a(i, 5) = .List(i, 16)
a(i, 6) = .List(i, 5)
a(i, 7) = .List(i, 7)
a(i, 8) = .List(i, 8)
a(i, 9) = .List(i, 9)
a(i, 10) = .List(i, 11)
a(i, 11) = .List(i, 12)
a(i, 12) = .List(i, 13)
Next
End With
sh.Range("A7").Resize(UBound(a, 1) + 1, UBound(a, 2)).Value = a