I have used this in the past and it works great to solve this problem:

http://groups.google.com.au/group/microsoft.public.excel.programming/browse_frm/thread/72df0d453fa8eebb/2d0abc64e322ac8d#2d0abc64e322ac8d?hl=en&lr=&rnum=1&prev=/groups%3Fq%3DMicrosoft%2BExcel%2Bis%2Bwaiting%2Bfor%2Banother%2Bapplication%2Bto%2Bcomplete%2Ban%2BOLE%2Baction%26hl%3Den&safe=on

If you cannot get the link here is the text:


 
You can solve this by using the COM API to remove VBA's message filter. 
This will prevent COM from telling VBA to displaying a message box when it 
thinks the process you're calling has blocked. Note that if the process 
really has blocked for some reason this will prevent you from receiving 
any notification of that. 


Private Declare Function _ 
    CoRegisterMessageFilter Lib "OLE32.DLL" (ByVal lFilterIn As Long, 
ByRef lPreviousFilter) As Long

 
Sub KillMessageFilter() 

    Dim lMsgFilter As Long 

    ''' Remove the message filter before calling Reflections. 
    CoRegisterMessageFilter 0&, lMsgFilter 

    ''' Call Reflections here.... 

    ''' Restore the message filter after calling Reflections. 
    CoRegisterMessageFilter lMsgFilter, lMsgFilter 

End Sub 





Erich Neuwirth <[EMAIL PROTECTED]> 
Sent by: [EMAIL PROTECTED]
09/02/08 05:37 AM
Please respond to
"R \(D\)COM and RExcel server related issues" 
<rcom-l@mailman.csd.univie.ac.at>


To
"R (D)COM and RExcel server related issues" 
<rcom-l@mailman.csd.univie.ac.at>
cc

Subject
Re: [Rcom-l] OLE time-out problem





AFAIK the timeout problem is a problem deeply rooted in the COM server.
At the moment, there seems to be no easy workaround.
We are aware of the problem, and hopefully will be able
to cope with it in future releases of the server(s).



Kidd, M, Prof <[EMAIL PROTECTED]> wrote:
> I am trying to call the ?hetcor?  function to calculate polychoric 
> correlations from excel.  This function can take some time to complete 
> for large datasets and I then encounter the problem of the time-out 
> dialog box continuously appearing.  I have seen in previous writings 
> that ?Application.DisplayAlerts =False? might solve the problem but it 
> did not do so in my case.  Is there any way around this problem when you 

> are calling functions that are taking a long time to complete?
> 
> Thank you.
> 
> Martin
> 
> Prof Martin Kidd
> 
> Centre for Statistical Consultation
> 
> Dept of Statistics and Actuarial Sciences University of Stellenbosch 
> Private Bag X1, Matieland 7602, South Africa
> 
> Tel: 8082561
> 
> Fax: 8083830
> 
> Cel: 0837334941
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> Rcom-l mailing list
> Rcom-l@mailman.csd.univie.ac.at
> http://mailman.csd.univie.ac.at/mailman/listinfo/rcom-l
> More information (including a Wiki) at http://rcom.univie.ac.at

-- 
Erich Neuwirth, University of Vienna
Faculty of Computer Science
Computer Supported Didactics Working Group
Visit our SunSITE at http://sunsite.univie.ac.at
Phone: +43-1-4277-39464 Fax: +43-1-4277-39459
_______________________________________________
Rcom-l mailing list
Rcom-l@mailman.csd.univie.ac.at
http://mailman.csd.univie.ac.at/mailman/listinfo/rcom-l
More information (including a Wiki) at http://rcom.univie.ac.at

_______________________________________________
Rcom-l mailing list
Rcom-l@mailman.csd.univie.ac.at
http://mailman.csd.univie.ac.at/mailman/listinfo/rcom-l
More information (including a Wiki) at http://rcom.univie.ac.at

Reply via email to