+ Reply to Thread
Results 1 to 2 of 2

Threaded programming in VBA

  1. #1
    Martin
    Guest

    Threaded programming in VBA

    Hi

    Does VBA (Excel) offer any tools for threaded programming?

    If one uses the wait for child API call, it is possible to pause a VBA
    macro, while some other program runs, producing some data, for the
    macro.

    But if the child program takes a long time to finish its work, Excel is
    blocked, waiting for the child. Just imagine the irritation of the
    users.

    Is there some way to use synchronization, in VBA, so part of the code
    waits for the child while another keeps running with limited access to
    variables, ranges and so on?

    I hope this is understandable (I'm not completely sure I understand
    myself). I guess what I'm trying to do is to gain control not only over
    what Excel does, but also when it does it. And preferebly more than one
    thing at the time.


  2. #2
    Chip Pearson
    Guest

    Re: Threaded programming in VBA

    VBA has no support whatsoever for multiple threads. All code must
    be run synchronously.


    --
    Cordially,
    Chip Pearson
    Microsoft MVP - Excel
    Pearson Software Consulting, LLC
    www.cpearson.com


    "Martin" <[email protected]> wrote in message
    news:[email protected]...
    > Hi
    >
    > Does VBA (Excel) offer any tools for threaded programming?
    >
    > If one uses the wait for child API call, it is possible to
    > pause a VBA
    > macro, while some other program runs, producing some data, for
    > the
    > macro.
    >
    > But if the child program takes a long time to finish its work,
    > Excel is
    > blocked, waiting for the child. Just imagine the irritation of
    > the
    > users.
    >
    > Is there some way to use synchronization, in VBA, so part of
    > the code
    > waits for the child while another keeps running with limited
    > access to
    > variables, ranges and so on?
    >
    > I hope this is understandable (I'm not completely sure I
    > understand
    > myself). I guess what I'm trying to do is to gain control not
    > only over
    > what Excel does, but also when it does it. And preferebly more
    > than one
    > thing at the time.
    >




+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1