Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 74
Default Values from a ListBox

Good Day Group,

How to do a "short" code that picks the text in
the first Column of a ListBox (that has unknown rows).
The picked text will be used in a For Next loop from
ListBox Row(1) to the end.

Brgds

CG Rosén


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,327
Default Values from a ListBox

Hi GC

Private Sub CommandButton1_Click()
Dim S As String
Dim L As Long
For L = 0 To ListBox1.ListCount - 1
S = S & ListBox1.List(L, 0) & vbNewLine
Next
MsgBox S
End Sub


HTH. Best wishes Harald

"CG Rosén" skrev i melding
...
Good Day Group,

How to do a "short" code that picks the text in
the first Column of a ListBox (that has unknown rows).
The picked text will be used in a For Next loop from
ListBox Row(1) to the end.

Brgds

CG Rosén




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
Listbox Values Richard Excel Discussion (Misc queries) 3 July 29th 08 12:22 AM
ListBox with Horizontal Values Scott Halper Excel Worksheet Functions 1 March 27th 07 12:20 AM
Fill values into a listbox matching selected values from a combobox Jon[_19_] Excel Programming 4 January 25th 05 04:25 PM
Compare Listbox values with Collection values Stuart[_5_] Excel Programming 2 September 20th 03 01:58 PM
Sorting ListBox results or transposing ListBox values to other cells for sorting Rob[_8_] Excel Programming 1 July 9th 03 04:35 AM


All times are GMT +1. The time now is 12:32 AM.

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

About Us

"It's about Microsoft Excel"