List to Range

  • Thread starter Thread starter Jahsonn
  • Start date Start date
J

Jahsonn

Hi

I have a list on a userform. I would like to transfer all
of the values in the list to a range on Sheet2. Does
anyone know how to do this?
 
Jahsonn,

Try something like

With Me.ListBox1
Worksheets("Sheet2").Range("A1").Resize(.ListCount).Value
= .List
End With


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com
 
Jahsonn,

Something similar to the following should work...

With Worksheets("Sheet2")
.Range(.Cells(2, 1), .Cells(22, 1)).Clear ' Remove formatting
.Range(.Cells(2, 1), .Cells(22, 1)).Value = UserForm1.ListBox1.List ' Write
.Columns(1).AutoFit
End With

Regards,

Jim Cone
San Francisco, CA
 
Back
Top