LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Adding Items to an array


Having a bit of trouble with the following code. I am attempting t
create a drop down box that contains the contents of a list of cells.
The cells aren't in a fixed location and there could be a differen
number of items depending on another list box. So the array can't be
fixed size. How can I add the items I want to the array and the
display them in the combobox?

Thanks


Code
-------------------
Private Sub Categorybox_Change()
Dim typ() As Integer
Dim x As Integer
Dim r As Integer
Dim c As Integer
c = 2
r = 2
x = 0

Do While Cells(r, c) < categorybox.Value
r = r + 1
Loop
Do While Cells(r, c) = categorybox.Value
ReDim typ(x + 1)
typ(x) = Cells(r, (c + 1))
x = x + 1
r = r + 1
Loop
Typebox.List = typ()
End Sub

-------------------

--
musictec
-----------------------------------------------------------------------
musictech's Profile: http://www.excelforum.com/member.php...fo&userid=2485
View this thread: http://www.excelforum.com/showthread.php?threadid=38995

 
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
Adding items in Look In bar grok Excel Discussion (Misc queries) 1 October 30th 06 05:13 PM
Alphabetizing array items No Name Excel Programming 2 March 25th 05 09:22 PM
Counting items in an array ajitpalsingh200[_20_] Excel Programming 6 November 26th 04 03:33 PM
Number of Items in an Array. Craig & Co. Excel Programming 6 October 19th 04 02:46 PM
Adding Items to a ListBox-Unique Items Only jpendegraft[_14_] Excel Programming 2 May 2nd 04 02:27 AM


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