Re: Application.EnableEvents = False not working
- From: "Mangesh" <mangesh.yadav@xxxxxxxxx>
- Date: Tue, 10 May 2005 09:36:07 +0530
In your Worksheet_Change() event, add the following If statement:
Sub Worksheet_Change()
if cboIssues.ListIndex = 1 then
' your existing code here
end if
end Sub
This will trigger the event only when the index is 1. Or put <>1 if you need
the oposit thing to happen.
- Mangesh
"Paul Martin" <pmartin1960@xxxxxxxxxxx> wrote in message
news:1115690810.440174.190520@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
> Hi all
>
> I am trying to stop events as follows:
>
> Application.EnableEvents = False
> cboIssues.ListIndex = 1
> Application.EnableEvents = True
>
> The idea is that I don't want the Worksheet_Change() event to fire when
> I set the ComboBox index. But as soon as I run the 2nd line, it goes
> straight to the event. What am I not doing? I looked up help which
> suggested I need an EventClassModule to instantiate the Application,
> which I have done, but to no avail.
>
> Any help appreciated.
>
> Paul Martin
> Melbourne, Australia
>
.
- References:
- Application.EnableEvents = False not working
- From: Paul Martin
- Application.EnableEvents = False not working
- Prev by Date: Re: Translating English-Spanish on cells
- Next by Date: Calculations with different date formats
- Previous by thread: Re: Application.EnableEvents = False not working
- Next by thread: Protection in VB
- Index(es):