ComboBox Change Event Triggers on Value change in Worksheet

abi_learn_vba

Board Regular
Joined
Nov 6, 2009
Messages
215
Hi..

I have ComboBox_Change macro which is triggered on the value change in the ComboBox dropdown. But the Same ComboBox_Change macro is triggered if i change an value in the Worksheet. I have do not have any other event macro other than ComboBox_Change macro.

Can any one tell what would be going wrong with this?

Thanks
-Abi
 

Excel Facts

Spell Check in Excel
Press F7 to start spell check in Excel. Be careful, by default, Excel does not check Capitalized Werds (whoops)
Is the combobox linked to the worksheet in any way?

Perhaps through it's ControlSource or RowSource properties?
 
Upvote 0
I have a Dynamic named range in "ListFillRange" property of the ComboBox.

I have used "Mylist" as the named range, where the dynamic range is determined using below formula.

Code:
=OFFSET(Lists!$A$2,0,0,COUNTA(Lists!$A:$A)-1,1)

As you see here the Range is taken from the same workbook in the sheet "Lists".

As i said earlier i do not have any event other than ComboBox_Change() event.

Thanks
-Abi
 
Upvote 0
Abi

That could be where the problem lies.

What changes on the worksheet trigger the change event of the combobox?
 
Upvote 0
Your DNR is using a volatile formula, so recalculates whenever the workbook does. This causes the combobox to reload and the change event to fire.
 
Upvote 0
The Changes are like.. Entering a value in a Cell, Renaming a Sheet, Deleting an Value in a cell... Moving an Range etc.. All these Changes will trigger the combobox event. And also when i select an value in Combobox list the event macro is triggered twice.

Thanks
-Abi
 
Upvote 0
Rory,

Thanks for that info. How can i avoid it from recalculating. I tried using..

Code:
Application.Calculation = xlManual
.......
.......
Application.Calculation = xlAutomatic

But this did not resolve the problem..

Thanks
-Abi
 
Upvote 0
Don't link it directly to the worksheet. :)
If you really insist on doing that, you might try using INDEX rather than OFFSET to create the ranges, since that is only semi-volatile.
 
Upvote 0

Forum statistics

Threads
1,216,220
Messages
6,129,583
Members
449,520
Latest member
TBFrieds

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top