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

Hi all, I have items list in ListBox1 and I want macro on a button to
get that list in column A from Range A2 to down. Please can anyone
can help
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,986
Default ListBox List into Range


Private Sub CommandButton1_Click()
For i = 0 To UBound(ListBox1.List)
ActiveSheet.Range("A" & i + 2) = Me.ListBox1.List(i)
Next
End Sub




"K" wrote:

Hi all, I have items list in ListBox1 and I want macro on a button to
get that list in column A from Range A2 to down. Please can anyone
can help

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 557
Default ListBox List into Range

On Feb 23, 2:18*pm, JLGWhiz wrote:
Private Sub CommandButton1_Click()
* * For i = 0 To UBound(ListBox1.List)
* * * * *ActiveSheet.Range("A" & i + 2) = Me.ListBox1.List(i)
* * Next
End Sub



"K" wrote:
Hi all, *I have items list in ListBox1 and I want macro on a button to
get that list in column A from Range A2 to down. *Please can anyone
can help- Hide quoted text -


- Show quoted text -


Thanks
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
Write a Listbox list to a dynamic range blayne Excel Programming 5 November 29th 05 05:35 PM
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
Listbox Add to list Hank[_2_] Excel Programming 3 September 9th 04 03:10 PM
Listbox "expand range as list grows" TK Excel Programming 3 September 8th 04 11:57 PM
listbox.value not equal to listbox.list(listbox.listindex,0) ARB Excel Programming 0 October 22nd 03 12:46 AM


All times are GMT +1. The time now is 07:00 PM.

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"