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 For..next.. help to fill listbox

THis is what I need:

In a user form, I need to fill 4 different listboxs with specific item
that fill specific criteria....

1) I have a list of 930 items in Column A
2) In columns B,C,D,E,F I have other various items germane to the ite
in Column A (company division, product line, weight, size, price, etc.
There are only FOUR product lines common to all divisions. (lets cal
them "LINE1", "LINE2", "LINE3", LINE4 and say that these names ar
entered in column C)

I have a userform that asks the user to select the COMPANY DIVISIO
from a combo box. I need four combo boxes to be populated with al
products from the product lines for that division.

So I am thinking I need to do some sort of a for...next loop to chec
the criteria of the cells in the worksheet to see if they should b
added to the listbox....problem is I am somewhat of a novice in VBA an
am not so good with the for..next loops...

What I need is a code that kind of does something like this:
__________________________________________________
'For Product Line 1 List Box: '' FIRST list box
' for each cell in range (x)
' If combobox1.value = Cell in Column B in Sheet2 value AND cell offse
(0,1) = LINE1 then additem to listbox1
' next

'For Product Line 2 List Box: '' SECOND list box
' for each cell in range (x)
' If combobox1.value = Cell in Column B in Sheet2 value AND cell offse
(0,1) = LINE2 then additem to listbox2
' next

Etc.
_____________________________________
Can someone help me please with the correct code for such a addite
technique

--
Message posted from http://www.ExcelForum.com

 
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 B conditional of input in Listbox A Kim K Excel Discussion (Misc queries) 1 October 31st 06 08:27 PM
Fill a Listbox with Values from a Pivot Table Field - an Example DataFreakFromUtah Excel Programming 0 February 12th 04 04:12 PM
listbox.value not equal to listbox.list(listbox.listindex,0) ARB Excel Programming 0 October 22nd 03 12:46 AM
Is refreshing listbox rowsource in listbox click event possible? Jeremy Gollehon[_2_] Excel Programming 4 September 25th 03 06:45 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 10:43 PM.

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"