Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
List Box and length
Hi,
I need to get a way to figure out hos many items I have in a Listbox, to loop through all and get the values from it. Can anybody help? Here is my code - I would like my "i" to get the number of items, and then loop through all of them later.: Set myWb = ActiveWorkbook Set myWsBudGrunnlag = myWb.Worksheets.Item ("Budget") Set myWsNokkeltall = myWb.Worksheets.Item ("KeeFigures") Dim cboEiendom As Object Set cboEiendom = myWsBudGrunnlag.Shapes.Item (1).OLEFormat.Object.Object Dim i i = 100 ' This is the integer i would like to set equal the number of items in the Listbox called cboEiendom, for looping through under Dim j For j = 1 To i strEiendom = cboEiendom.List(j - 1) myWsNokkeltall.Cells(j + 2, iColEiendom).Value = strEiendom ' Some more code... Next j Please advice, thx! Best regrads, Tor Erik |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Limit to the length of a list in a combo box | Excel Discussion (Misc queries) | |||
Length of a list in a combo box | Excel Discussion (Misc queries) | |||
Data Validation "List" - Setting length of list shown | Excel Discussion (Misc queries) | |||
Call list length in formula | Excel Discussion (Misc queries) | |||
list box length | Excel Worksheet Functions |