Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() This is my procedu Private Sub DisplayProductStages() Dim ListItems As Variant, i As Integer, j As Integer i = 1 Do Until IsEmpty(Cells(17, i)) If Cells(17, i).Value = Range("F1").Value Then ' found the product - display the product details j = 18 Do Until IsEmpty(Cells(j, i)) 'Find the last row containing product category data j = j + 1 Loop ListItems = Worksheets("Sheet1").Range(Cells(18, i), Cells(j i)).Value Worksheets("Sheet1").ListBox1.List() = ListItems End If i = i + 1 Loop End Sub This is the code that calls it: Private Sub ComboBox2_Change() Worksheets("Sheet1").ComboBox2.BoundColumn = 1 Range("F1") = ComboBox2.Value Call DisplayProductStages End Sub The code works (albeit slowly) when the call to the procedure was in ComboBox2_Click() event but doesn't work in the change event. Th IsEmpty tests work and "stop" in the right place it seems to be th actual click event that was being called loads of times. . Thanks for your interest -- smac ----------------------------------------------------------------------- smace's Profile: http://www.excelforum.com/member.php...fo&userid=1432 View this thread: http://www.excelforum.com/showthread.php?threadid=26166 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Combobox Click event triggered when copying worksheet | Excel Programming | |||
Click event on combobox in a loop | Excel Programming | |||
loop through Combobox | Excel Programming | |||
Copying Worksheet triggers Click event of combobox | Excel Programming | |||
Copying Worksheet triggers Click event of combobox on another worksheet | Excel Programming |