Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
Ten Ten is offline
external usenet poster
 
Posts: 9
Default 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
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
Limit to the length of a list in a combo box Fraser B Excel Discussion (Misc queries) 3 February 9th 09 02:44 PM
Length of a list in a combo box Fraser B[_2_] Excel Discussion (Misc queries) 4 February 9th 09 02:22 PM
Data Validation "List" - Setting length of list shown Dave Excel Discussion (Misc queries) 3 January 31st 08 06:51 PM
Call list length in formula steev_jd Excel Discussion (Misc queries) 2 May 17th 06 10:11 AM
list box length Larry M Excel Worksheet Functions 2 November 24th 04 12:17 AM


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