A Microsoft Excel forum. ExcelBanter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » ExcelBanter forum » Excel Newsgroups » Excel Programming
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

asynchronous Procedure Calls



 
 
Thread Tools Display Modes
  #1  
Old November 9th 05, 12:50 AM posted to microsoft.public.excel.programming
Robert Mulroney[_3_]
external usenet poster
 
Posts: 71
Default asynchronous Procedure Calls

Can anyone point me to a good resource on writing asynchronous procedure
calls? I am particually interested to know if it is possible to do an
asynchronous call on the application.run("") procedure.

- Rm
Ads
  #2  
Old November 9th 05, 12:58 AM posted to microsoft.public.excel.programming
Tim Williams
external usenet poster
 
Posts: 1,588
Default asynchronous Procedure Calls

Robert,

I think Excel (in any single instance) is single-threaded, so I'm not surre
it supports true asynchronous calls.

Tim.

--
Tim Williams
Palo Alto, CA


"Robert Mulroney" ''''> wrote in message
...
> Can anyone point me to a good resource on writing asynchronous procedure
> calls? I am particually interested to know if it is possible to do an
> asynchronous call on the application.run("") procedure.
>
> - Rm



  #3  
Old November 9th 05, 01:19 AM posted to microsoft.public.excel.programming
Robert Mulroney[_3_]
external usenet poster
 
Posts: 71
Default asynchronous Procedure Calls

I just want to be able to a cancel button to a form so users can end a
calculation if it's taking too long.

"Tim Williams" wrote:

> Robert,
>
> I think Excel (in any single instance) is single-threaded, so I'm not surre
> it supports true asynchronous calls.
>
> Tim.
>
> --
> Tim Williams
> Palo Alto, CA
>
>
> "Robert Mulroney" ''''> wrote in message
> ...
> > Can anyone point me to a good resource on writing asynchronous procedure
> > calls? I am particually interested to know if it is possible to do an
> > asynchronous call on the application.run("") procedure.
> >
> > - Rm

>
>
>

  #4  
Old November 9th 05, 01:52 AM posted to microsoft.public.excel.programming
Alvin
external usenet poster
 
Posts: 19
Default asynchronous Procedure Calls

in your case, you can put "DoEvents" inside the long calculation/loop
so vba can catch the cancel button events
still it is not asynchronous and it's not the best way, but it's simple

"Robert Mulroney" wrote:

> I just want to be able to a cancel button to a form so users can end a
> calculation if it's taking too long.
>
> "Tim Williams" wrote:
>
> > Robert,
> >
> > I think Excel (in any single instance) is single-threaded, so I'm not surre
> > it supports true asynchronous calls.
> >
> > Tim.
> >
> > --
> > Tim Williams
> > Palo Alto, CA
> >
> >
> > "Robert Mulroney" ''''> wrote in message
> > ...
> > > Can anyone point me to a good resource on writing asynchronous procedure
> > > calls? I am particually interested to know if it is possible to do an
> > > asynchronous call on the application.run("") procedure.
> > >
> > > - Rm

> >
> >
> >

  #5  
Old November 9th 05, 02:16 AM posted to microsoft.public.excel.programming
Robert Mulroney[_3_]
external usenet poster
 
Posts: 71
Default asynchronous Procedure Calls

Yeah, I would normally do that but the procedure that I'm calling is from a
3rd party product, I have no control over the function I'm trying to cancel.
At the moment my fuction looks something like this:


public sub doCalc()

frmCCPending.show
Activesheet.calculate

' I want to call this async
Application.run("onCalculateHandler")
frmCCPending.hide

End Sub

and we wait on the last line. I'd like to have a cancel button on
frmCCPending that ends the async call. The procedure "onCalculateHandler" is
defined in a locked 3rd party addin so I can't alter it and put a doEvents
call in it.


- Rm

"Alvin" wrote:

> in your case, you can put "DoEvents" inside the long calculation/loop
> so vba can catch the cancel button events
> still it is not asynchronous and it's not the best way, but it's simple
>
> "Robert Mulroney" wrote:
>
> > I just want to be able to a cancel button to a form so users can end a
> > calculation if it's taking too long.
> >
> > "Tim Williams" wrote:
> >
> > > Robert,
> > >
> > > I think Excel (in any single instance) is single-threaded, so I'm not surre
> > > it supports true asynchronous calls.
> > >
> > > Tim.
> > >
> > > --
> > > Tim Williams
> > > Palo Alto, CA
> > >
> > >
> > > "Robert Mulroney" ''''> wrote in message
> > > ...
> > > > Can anyone point me to a good resource on writing asynchronous procedure
> > > > calls? I am particually interested to know if it is possible to do an
> > > > asynchronous call on the application.run("") procedure.
> > > >
> > > > - Rm
> > >
> > >
> > >

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Calls per Day Nate Excel Discussion (Misc queries) 1 September 17th 08 09:59 PM
Asynchronous call (macro) Rodrigo Ferreira Excel Discussion (Misc queries) 1 August 29th 07 07:41 PM
Looping procedure calls userform; how to exit loop (via userform button)? KR Excel Programming 6 July 27th 05 12:57 PM
VBA Calls Rob Bovey Excel Programming 4 August 23rd 03 05:32 AM


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


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