Reputation: 9
I have a script that pulls the first cell value of a table from a database and adds it 10 times. I want to write that list to excel.
Here's what I have so far:
sub x()
Dim myArray As Variant
Dim i As Variant
myArray = Sheets("License Plate Number").Range("LP")
myVariable = (Trim(Right(mp_start, 12)))
For i = 0 To (ord_qty / 120) - 1
Myarr = "MP" & myVariable + i
myArray = Myarr
'MsgBox Myarr
Debug.Print Myarr
Next i
end sub
How can I write to a range using VBA?
Upvotes: 0
Views: 1357