Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Help with activex listbox control


Hi,

I知 experiencing some annoying problems with activex listbox controls
that I知 hoping someone with greater experience than I can help me out
with.

I have an Excel spreadsheet that contains an embedded activex listbox
control. When the user makes a selection in the listbox, the
Listbox_Click() event is triggered more than twice when I
programmatically set the value of the listbox. In other words, the
sequence of events are as follows:
1. User makes a selection in the listbox
2. Listbox_Click() event fires once and runs to completion in most
situations. However, in certain circumstances, step2 repeats 5-6 times
when I set the value of the listbox programmatically! This occurs even
if the EnableEvents and EnableCalculation properties of the Application
and Sheet property are set to False.
3. Focus and control returned back to Excel spreadsheet containing the
control.

The code in the Click event is pretty simple:

Private Sub ListBox1_Click()

MsgBox "ListBox1 Click() Event Fired"

If ListBox1.Value = 0 Then
ListBox1.Value = 1
End If

End Sub

From the code, one would expect the Click event to be fired a total of
two times: once when the user selects the first item, and second when
the selection is changed to the next row programmatically by changing
the value of the listbox. What's going on?

Relevant properties of the listbox are given below:
Name: LikeItemsListBox
Autoload: False
BoundColumn: 1
Enabled: True
LinkedCell:
Locked: True
Multiselect: 0-fmMultiSelectSingle
Textcolumn: -1
Value:

Any ideas?

Thanks a lot for your help.

Amit


+-------------------------------------------------------------------+
|Filename: Listbox firing continuously!.zip |
|Download: http://www.excelforum.com/attachment.php?postid=3666 |
+-------------------------------------------------------------------+

--
programmer123
------------------------------------------------------------------------
programmer123's Profile: http://www.excelforum.com/member.php...o&userid=25011
View this thread: http://www.excelforum.com/showthread...hreadid=392279

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default Help with activex listbox control

Btw, I have uploaded a sample Excel spreadsheet that illustrates this
problem: http://www.vbforums.com/showthread.p...80#post2108380

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
2007 Form Control/ActiveX Control font difference Nikko963 Excel Discussion (Misc queries) 0 April 15th 09 04:21 PM
How to set the selected state of an embedded ActiveX listbox [email protected] Excel Discussion (Misc queries) 1 February 5th 07 09:30 PM
ActiveX Listbox Control TrendyProgrammer Excel Programming 1 August 2nd 05 08:37 PM
Help with Excel ActiveX listbox controls programmer123 Excel Discussion (Misc queries) 0 July 7th 05 10:30 PM
Help with Excel ActiveX listbox controls programmer123 Excel Programming 0 July 7th 05 10:23 PM


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