VB and Threads?

Posted on 2005-03-22
Medium Priority
Last Modified: 2010-05-02
Dear Experts

I need to wait for a boolean variable to become TRUE before i can proceed through to the next statement - this boolean variable is set to true when an event occurs - is there anyway i could possibly create a thread which keeps evaluating this process. or simply wait for the event to occur before the program execution carries on?

Question by:Mr_A_Smith
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
LVL 53

Accepted Solution

Dhaest earned 400 total points
ID: 13601647
While YourBool = false
LVL 53

Expert Comment

ID: 13601649
Read this article about threads in VB:

Quite often, the method to achieve this in VB is to use ActiveX EXEs:

Multi Threading in VB can be accomplish throw activeX exe
Don't use Createthread since VB6 is an appartment thread and It will may cause your system to crash.
Save yourself the trouble and do it with .NET
If you want to do it with VB 6 you should read this from the vb6 documentaion

2 more examples:
Rant: Multithreading: A Kludge for Poor Software Design
HowTo: Let a long process run asynchronously without multithreading

Author Comment

ID: 13601970
Dear Dhaest,

Your first post did the trick, no threading needed. Thank you very much :)

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses
Course of the Month11 days, 16 hours left to enroll

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question