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 Click event on combobox in a loop


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
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
Combobox Click event triggered when copying worksheet Tom Ogilvy Excel Programming 2 June 30th 05 04:54 PM
Click event on combobox in a loop smace Excel Programming 1 September 20th 04 04:29 PM
loop through Combobox akyhne Excel Programming 2 May 25th 04 02:34 PM
Copying Worksheet triggers Click event of combobox Copying Worksheet triggers click event on combobox Excel Programming 2 January 25th 04 10:51 PM
Copying Worksheet triggers Click event of combobox on another worksheet Robert[_20_] Excel Programming 0 January 23rd 04 07:40 PM


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