For best use of memory and speed of macro what is the best coding?
This:
[vba]
Dim lbtarget As MSForms.ListBox
Dim rngSource As Range
Set rngSource = Worksheets("Sheet1").Range("A2:C5")
Set lbtarget = Me.ListBox1
With lbtarget
.List = rngSource.Cells.Value
Set rngSource = Nothing
Set lbtarget = Nothing
End With
[/vba]
Or this
[vba]
Dim rngSource As Range
Set rngSource = Worksheets("Sheet1").Range("A2:C5")
With Me.ListBox1
.List = rngSource.Cells.Value
Set rngSource = Nothing
End With
[/vba]
Thanks to all for reply.