Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default Export listbox items to worksheet

Hi there dear reader...
I have a userform with a listbox.
I would like to export the the items of the listbox into a worksheet.
Here below my code which doesn't work unfortunately. I don't know why.

Dim c As Variant
Dim i As Integer
c = ThisWorkbook.Worksheets("Sheet1").Range("a1:e5")
For i = 0 To ListBox1.ListCount - 1
c(i + 1, 1) = ListBox1.List(i, 1)
Next i

--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...mming/200904/1

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default Export listbox items to worksheet

I found the solution.The here below code works

Dim c As Variant
Dim i As Integer
c = ThisWorkbook.Worksheets("Sheet1").Range("a1:e5")
For i = 0 To ListBox1.ListCount - 1
Cells(i + 1, 1) = ListBox1.List(i, 1)
Next i


Honnore wrote:
Hi there dear reader...
I have a userform with a listbox.
I would like to export the the items of the listbox into a worksheet.
Here below my code which doesn't work unfortunately. I don't know why.

Dim c As Variant
Dim i As Integer
c = ThisWorkbook.Worksheets("Sheet1").Range("a1:e5")
For i = 0 To ListBox1.ListCount - 1
c(i + 1, 1) = ListBox1.List(i, 1)
Next i


--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...mming/200904/1

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
How to disable items in a listbox? feltra Excel Programming 3 January 23rd 09 10:33 AM
add items to listbox Baha Excel Programming 1 November 24th 06 01:44 AM
ListBox items paste into worksheet in reverse order Casey[_77_] Excel Programming 4 April 26th 06 06:19 PM
Adding Items to a ListBox-Unique Items Only jpendegraft[_14_] Excel Programming 2 May 2nd 04 02:27 AM
Items in a Listbox Todd Huttenstine Excel Programming 1 April 26th 04 03:36 PM


All times are GMT +1. The time now is 05:13 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"