Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
if AddIn_1 isRunning vbcr application.enableEvents=False vbcr end if: how to do this??
(apologies - I tabbed in my code and managed to send previous email
before finishing) I have written an AddIn (call it AddIn_2) which picks up where another (AddIn_1) leaves off. AddIn_2 uses events to identify when a particular worksheet is activated to enable a menu item. AddIn_1 creates that worksheet and reiteratively activates it during its process ... causing a messy crash. AddIn_1 is a commercial product and I have no access to its code. But I do know its VBAProjectName and fileName. I want to be able to insert into my sub App_SheetActivate a clause like if AddIn_1 is running exit sub (i.e. stop right there!) end if My question is how to recognise the process spawned by AddIn_1? Thanks in advance Matthew |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
if AddIn_1 isRunning vbcr application.enableEvents=False vbcr end if: how to do this??
Hi Mathew,
AddIn_1 creates that worksheet and reiteratively activates it during its process ... causing a messy crash. What, you mean it keeps re .Select'ing it, a commercial product! It took me a while to get what you meant by"recognize the process spawned", some problem with tadpoles or funghi. But eventually I think I got it, the other addin selects different sheets triggering events in your addin. not tested but instead of - ' in sub App_SheetActivate if AddIn_1 is running exit sub (i.e. stop right there!) end if try Set gSht = sht ' whatever arg name you have for the activated sheet Application OnTime Now, "DoShtActivate" ' perhaps also if multiple false events Application.Enable events = False ' slightly risky ' in normal module Public gSht as Object sub DoShtActivate() Application.Enable events = True if Activesheet is gSht then ' process gSht end if set gSht = Nothing ' also some error handling End sub Regards, Peter T "Matthew Dodds" wrote in message oups.com... (apologies - I tabbed in my code and managed to send previous email before finishing) I have written an AddIn (call it AddIn_2) which picks up where another (AddIn_1) leaves off. AddIn_2 uses events to identify when a particular worksheet is activated to enable a menu item. AddIn_1 creates that worksheet and reiteratively activates it during its process ... causing a messy crash. AddIn_1 is a commercial product and I have no access to its code. But I do know its VBAProjectName and fileName. I want to be able to insert into my sub App_SheetActivate a clause like if AddIn_1 is running exit sub (i.e. stop right there!) end if My question is how to recognise the process spawned by AddIn_1? Thanks in advance Matthew |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
preventing Application.EnableEvents = False | Excel Programming | |||
vblf and vbcr one last question | Excel Programming | |||
Application.EnableEvents = False not working | Excel Programming | |||
Supressing CHR13 or vbCr write in text file | Excel Programming | |||
Problems with BeforeSave and Application.EnableEvents = False | Excel Programming |