Stop Combo Box Sub Running

eoinymc

Board Regular
Joined
Jan 29, 2009
Messages
203
Hi,

I have a large macro called SplitData, which takes a load of data and splits it and reformats it each month.

I have 4 Activex Control combo boxes on one sheet that are linked to a range...this range changes each month, so I blank out the range and then repopulate.

My problem is that when I blank out the range, it triggers the Private Sub ComboBox1_Change() and throws some errors because there is no data to select.

So, I was wondering if there is something I can set in my SpltData macro that will not run the ComboBox1_Change sub while the SplitData macro is running?

Any help would be greatly appreciated!

Thanks,

Eoin
 

Excel Facts

Excel Can Read to You
Customize Quick Access Toolbar. From All Commands, add Speak Cells or Speak Cells on Enter to QAT. Select cells. Press Speak Cells.
It is possible to stop events occurring while code is running and then re-enable them something like this. Please note that if you code does not finish events will be switched off.
It is only possible to re-enable with code.

Code:
Application.EnableEvents = False
'=================================
'- your code here
'=================================
Application.EnableEvents = True
 
Upvote 0

Forum statistics

Threads
1,216,458
Messages
6,130,757
Members
449,588
Latest member
accountant606

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