ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   ListBox (https://www.excelbanter.com/excel-programming/283857-listbox.html)

GarethG[_12_]

ListBox
 

I want to read the values in a listbox. How do I reference a particula
index position in a ListBox
i.e.

MyVal = ListBox1.<Value of Index Position 3

Anyone

-----------------------------------------------
~~ Message posted from http://www.ExcelTip.com
~~View and post usenet messages directly from http://www.ExcelForum.com


Chip Pearson[_2_]

ListBox
 
Gareth,

Use something like

MyVal = ListBox1.List(2)

The index into the List is 0-based, so 0 is the first item, 1 is
the second item, and so on.


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com


"GarethG" wrote in message
...

I want to read the values in a listbox. How do I reference a

particular
index position in a ListBox
i.e.

MyVal = ListBox1.<Value of Index Position 3

Anyone?


------------------------------------------------
~~ Message posted from http://www.ExcelTip.com/
~~View and post usenet messages directly from

http://www.ExcelForum.com/




MSP77079[_6_]

ListBox
 

ListBox question:
I want to read the values in a listbox. How do I reference a particula
index position in a ListBox


thisItem = ListBox1.List(ListBox1.ListIndex

-----------------------------------------------
~~ Message posted from http://www.ExcelTip.com
~~View and post usenet messages directly from http://www.ExcelForum.com



All times are GMT +1. The time now is 02:58 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com