Results 1 to 9 of 9

Thread: VBA Threading

  1. #1
    Join Date
    May 2004
    Location
    NH
    Posts
    87

    Unanswered: VBA Threading

    Possible?... or anything similar

    I've searched and came up empty...

    i.e. While this is running, do this and this also and etc...

    Thanks
    -Warren
    Hack the Planet.

  2. #2
    Join Date
    Jan 2004
    Location
    The Netherlands
    Posts
    421
    As far as i know: not possible, but i may be wrong.

    Regards

  3. #3
    Join Date
    Nov 2003
    Location
    Sussex, England
    Posts
    404

    VBA Threading

    Not in VBA, there is apartment threading in VB6.

    Maybe in .net?

  4. #4
    Join Date
    May 2004
    Location
    NH
    Posts
    87
    .NET is STA (at least in the general overview's I've read).

    I knew it was a lost cause asking, but I wasn't sure if there was some sort of 'mock' threading with VBA; kind of like their 'mock' inheritence structure.

    Thanks,
    -Warren
    Hack the Planet.

  5. #5
    Join Date
    Oct 2003
    Posts
    706
    < Duplicate - deleted >
    Last edited by sundialsvcs; 10-19-04 at 10:38.
    ChimneySweep(R): fast, automatic
    table repair at a click of the
    mouse! http://www.sundialservices.com

  6. #6
    Join Date
    Oct 2003
    Posts
    706
    You can run multiple instances of the application, which actually is not too far different from threading.

    But first, you need to ask if the threads could actually, productively, meaningfully work 'in parallel.' If they are accessing the same database at the same time, basically they couldn't. They're going to wind up serializing their activities one way or the other, inching forward in a random sequence and completing their work in much more time than they would have taken if launched sequentially.
    ChimneySweep(R): fast, automatic
    table repair at a click of the
    mouse! http://www.sundialservices.com

  7. #7
    Join Date
    Dec 2002
    Location
    Préverenges, Switzerland
    Posts
    3,740
    you can run a query asynchronously via odbc, but i haven't thought of an excuse to do it yet.

    izy
    currently using SS 2008R2

  8. #8
    Join Date
    Jan 2004
    Location
    The Netherlands
    Posts
    421
    Come to think of it i did a "threading" thing some time ago....

    It was concerning a process that took up to 1 hour. Working over data that needed to be processed stuff. 10,000 + records

    I created 3 additional, what i called "shadow", databases, with the very same code as the orriginal one, using a linked table back to the original table. The original database worked from record 1 to 10,000 (doing all but checking if it was allready processed)
    Then #2 started from halve way (5,000) and startup up, quiting when finding a processed record (when it meets the original)
    #3 started from 3/4 (7,500) and going up, quiting when finding a processed record (when it either meets the start of #2 or the original)
    #4 bla bla....

    All startpoints are calculated by doing a count on the table and defiding and stuff.... In the end it did cut the processing of this process down to max 20 mins.

    Hope this helps.

    Regardz

  9. #9
    Join Date
    Jul 2009
    Location
    UK
    Posts
    1

    Some Help Maybe.. Worcester PC

    When I tried to log on to my dekstop, a message saying “there are not sufficient resources to load” my account with the default something-or-other came up. The message had a timer that was going to close the message, and then when it closed it would not log me on. I could not turn it off normally so I cut the power. When I turned it back on I logged on fine?
    I read here PC Repair but couldnt make sense?




    *

Posting Permissions

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