Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 26
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,600
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
preventing Application.EnableEvents = False x taol Excel Programming 1 March 29th 06 11:12 AM
vblf and vbcr one last question terrysoper1973[_2_] Excel Programming 2 January 5th 06 10:49 PM
Application.EnableEvents = False not working Paul Martin Excel Programming 3 May 10th 05 05:06 AM
Supressing CHR13 or vbCr write in text file Edwin Niemoller[_2_] Excel Programming 0 March 9th 05 08:38 PM
Problems with BeforeSave and Application.EnableEvents = False Sanne Excel Programming 3 February 11th 05 12:26 PM


All times are GMT +1. The time now is 07:10 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"