Disabling combobox1_click event

Posted on 2010-09-15
Medium Priority
Last Modified: 2012-05-10
I tried to disable the combobox1_click event through the following statements on the sheet module

        Application.EnableEvents = False
        Application.EnableEvents = True

But the event is still triggered. Why?

Question by:Saqib Husain, Syed
1 Comment
LVL 85

Accepted Solution

Rory Archibald earned 2000 total points
ID: 33680610
Because EnableEvents does not affect controls. You need to use a boolean variable which you set to True (or False depending on how you use it) and then have the first line of the Click event check the variable and exit if True.

Featured Post

Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

In Part II of this series, I will discuss how to identify all open instances of Excel and enumerate the workbooks, spreadsheets, and named ranges within each of those instances.
What to do if a split doesn't fit? Or a bunch of invoice lines must be rounded while the sum must match a total? It takes a little, but - when done - it is extremely easy to implement.
Graphs within dashboards are meant to be dynamic, representing data from a period of time that will change each time the dashboard is updated with new data. Rather than update each graph to point to a different set within a static set of data, t…
This Micro Tutorial will demonstrate the scrolling table in Microsoft Excel using the INDEX function.

597 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question