Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default List to Range

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?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default List to Range

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" wrote in message
...
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?



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,290
Default List to Range

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

"Jahsonn" wrote in message
...
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?



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
advanced filter dialog box, "List Range" list two ranges? Excel_Kiwi Excel Worksheet Functions 1 October 27th 08 06:11 PM
List Box - For Input Range can I use named range in another workbo dim Excel Worksheet Functions 2 January 3rd 08 06:10 PM
Selecting range in list of range names depending on a cell informa Courreges Excel Discussion (Misc queries) 2 June 19th 06 10:59 AM
Condensing a list/range with blank cells to a new list/range without blanks KR Excel Worksheet Functions 4 July 5th 05 04:23 PM
how do i define a range as a list when there is no list option in. Domespacio Excel Worksheet Functions 2 May 25th 05 11:36 AM


All times are GMT +1. The time now is 07:34 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"