ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   CANCEL EVENTS (https://www.excelbanter.com/excel-programming/355913-cancel-events.html)

whylite

CANCEL EVENTS
 
Hi I am running a macro that causes another macro to occur. This causes an
error. What I would like to do is run the macro while leaving all other
macros disables until the current macro is finished executing. Any help
would be appreciated.
--
Thanks!
Shane W

Jim Thomlinson

CANCEL EVENTS
 
Application.enableevents = false
Application.enableevents = true

You should use an error handler with this type of code to ensure that in the
case of crash the events are turned back on...
--
HTH...

Jim Thomlinson


"whylite" wrote:

Hi I am running a macro that causes another macro to occur. This causes an
error. What I would like to do is run the macro while leaving all other
macros disables until the current macro is finished executing. Any help
would be appreciated.
--
Thanks!
Shane W


whylite

CANCEL EVENTS
 
Ya I tried this coding and my macro still causing the program to crash. I
have a lot of cells that are being populated some with combo boxes. I
managed to get the data to populate but the combo boxes remain blank. I am
thinking that when the enable events gets turned is when excel crashes on me.

--
Thanks!
Shane W


"Jim Thomlinson" wrote:

Application.enableevents = false
Application.enableevents = true

You should use an error handler with this type of code to ensure that in the
case of crash the events are turned back on...
--
HTH...

Jim Thomlinson


"whylite" wrote:

Hi I am running a macro that causes another macro to occur. This causes an
error. What I would like to do is run the macro while leaving all other
macros disables until the current macro is finished executing. Any help
would be appreciated.
--
Thanks!
Shane W



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

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