Solved

Disabling combobox1_click event

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

        Application.EnableEvents = False
        ComboBox1.Clear
        Application.EnableEvents = True

But the event is still triggered. Why?

0
Comment
Question by:Saqib Husain, Syed
1 Comment
 
LVL 85

Accepted Solution

by:
Rory Archibald earned 500 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.
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A little background as to how I came to I design this code: Around 5 years ago I designed an add-in that formatted Excel files to a corporate standard, applying different cell colours and font type depending on whether the cells contained inputs,…
Freeze panes is an option within all variants of Excel to enable parts of a sheet to remain stationary when the cursor is in another part of the sheet. This is a very useful feature which is overlooked or under used.
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 demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.

840 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