Would it possible to copy the contents of a listbox into the column of a spread sheet? When i try it only copies the selected item not all the values. Im new to VBA and this is for a school project. If you can help me then thanks.
If it's for a class, then I think LTrim would be a little beyond the scope. Besides, the
Code:
Offset
property would work just as well.
Code:
For x = 0 To ListBox.ListCount - 1
'Offset(row, column)
Range("A1").Offset(x, 0).Value = ListBox1.List(x)
Next x
Both bits of code do the same thing. Just a matter of choice, really. ----------------------------------------
If you are reading this, then you have read too far...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.