Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() i have a listbox in a userform were some text is in ( titles of books ) sometimes this are 5 titles, sometimes 3 or 20. now i need a code that when i push a button, the titles are being copied to cells in a worksheet beginning from cel a1 and my problem is, i don't know the right code. and its not: range("sheet1!a1") = listbox.text or .value plz help me -- tomro1 ------------------------------------------------------------------------ tomro1's Profile: http://www.excelforum.com/member.php...o&userid=35081 View this thread: http://www.excelforum.com/showthread...hreadid=550708 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
If you know how many items in the list (say 7) then try ...
Worksheets("Sheet1").Range("A1:A7").Value = Me.ListBox1.List -- Jim Cone San Francisco, USA http://www.realezsites.com/bus/primitivesoftware "tomro1" wrote in message i have a listbox in a userform were some text is in ( titles of books ) sometimes this are 5 titles, sometimes 3 or 20. now i need a code that when i push a button, the titles are being copied to cells in a worksheet beginning from cel a1 and my problem is, i don't know the right code. and its not: range("sheet1!a1") = listbox.text or .value plz help me -- tomro1 |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Code ------------------- Dim i As Integer, n As Integer With Me.ListBox1 For i = 0 To .ListCount - 1 If .Selected(i) Then n = n + 1 Sheets("Sheet1").Cells(n, "a").Value = .ListIndex(i) End If Next End With ------------------- -- jindo ----------------------------------------------------------------------- jindon's Profile: http://www.excelforum.com/member.php...fo&userid=1313 View this thread: http://www.excelforum.com/showthread.php?threadid=55070 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
data from listbox to cells | Excel Programming | |||
Insert cells in a ListBox | Excel Programming | |||
Linking Cells to ListBox - How? | Excel Programming | |||
listbox.value not equal to listbox.list(listbox.listindex,0) | Excel Programming | |||
Sorting ListBox results or transposing ListBox values to other cells for sorting | Excel Programming |