Multiple firing of macro from ListBox

  • Thread starter Thread starter SteveF
  • Start date Start date
S

SteveF

I have a listbox (from Controls Toolbox) that has a macro assigned to
the click event. However when I click it the macro ends up running 3
times.

If I create a listbox from the Forms Toolbox and assign it to the same
macro it works fine- but for various reasons I would like to use the
Controls listbox.

Anybody got ideas on why the macro fires 3 times? Is there a property
somewhere I'm not aware of?
 
Well it shouldn't fire 3 times, it should fire it only once.
Unless in addition to the click event, you have same code in change
event and GotFocus event of the list box.

Or worksheet_change event: since the linked cell value will check when
you click on new value, worksheet_change event is fired.

Or something in your code itself ..

Sharad
 
Hi

If the macro changes the listbox' listindex then that generates a click and
it will run itself.

HTH. Best wishes Harald
 
Back
Top