ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Worksheet Calculate Event (https://www.excelbanter.com/excel-programming/287915-worksheet-calculate-event.html)

Gustavo[_4_]

Worksheet Calculate Event
 
Hi everybody,
I need to trigger a macro after I update an autofilter
list. (excel 2000)
I read about the Worksheet Calculate and Worsheet Change
events here and I am using it. The problem is that part of
my macro makes some changes in the worksheet and therefore
it runs in an eternal loop.
Does anybody have a suggestion to solve this problem?
Thanks in advance
Gustavo

Gustavo[_4_]

Worksheet Calculate Event
 
Thanks Beto....it works great!
Gustavo
-----Original Message-----
Gustavo wrote:

Hi everybody,
I need to trigger a macro after I update an autofilter
list. (excel 2000)
I read about the Worksheet Calculate and Worsheet

Change
events here and I am using it. The problem is that

part of
my macro makes some changes in the worksheet and

therefore
it runs in an eternal loop.
Does anybody have a suggestion to solve this problem?


Hi, you need to disable the events and then enable them

after your macro
is run.

Application.EnableEvents = False
' Your macro goes here
Application.enableEvents = True

--
Beto
Reply: Erase between the dot (inclusive) and the @.
Responder: Borra la frase obvia y el punto previo.

.


Beto[_3_]

Worksheet Calculate Event
 
Gustavo wrote:

Hi everybody,
I need to trigger a macro after I update an autofilter
list. (excel 2000)
I read about the Worksheet Calculate and Worsheet Change
events here and I am using it. The problem is that part of
my macro makes some changes in the worksheet and therefore
it runs in an eternal loop.
Does anybody have a suggestion to solve this problem?


Hi, you need to disable the events and then enable them after your macro
is run.

Application.EnableEvents = False
' Your macro goes here
Application.enableEvents = True

--
Beto
Reply: Erase between the dot (inclusive) and the @.
Responder: Borra la frase obvia y el punto previo.



All times are GMT +1. The time now is 09:19 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com