LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 13
Default Detect Macro Completion

Hi. I wanted to ask if there is a way to detect that a macro has completed (by
completing, an error stopping the macro also counts). I have a VB application
that calls an Excel macro. The Excel macro makes a text file that the VB application
needs to continue, so the VB has to wawit before continuing.

In pseucode, i've done this waiting with a tight loop:

call the macro

While file_i'm_waiting_for doesn't exist
Wend

continue doing what i was doing

The tight loop gets what I need done in good situations, but for example,
if the macro experienced some kind of error that prevented it from completing
making the text file, the VB app will sit in that tight loop forever and just
hang. Isn't there some better way to detect that the macro is completed?
Like some property I can check, e.g. using While WB.active = True instead
of checking that the file exists. (I just made that "active" property up, but you know what I mean).

Thanks.
 
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
Macro for detect palindromes and repeats in letters/numbers string Luciano Paulino da Silva Excel Worksheet Functions 33 April 16th 09 04:59 PM
Macro for detect palindromes and repeats in letters/numbers string Luciano Paulino da Silva New Users to Excel 5 April 14th 09 08:44 PM
auto completion anirban Excel Discussion (Misc queries) 5 January 19th 09 11:23 PM
How can I detect if user is in Group Mode when a macro starts? R-N Excel Programming 5 June 15th 04 01:16 PM
Having a status bar (%completion) displayed while my macro runs I CAN FLY[_2_] Excel Programming 2 June 3rd 04 03:29 PM


All times are GMT +1. The time now is 12:25 PM.

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

About Us

"It's about Microsoft Excel"