Break(ending) A Running Procedure

Does Any Body Know How Can I Stop Any
Running Procedure From Another Procedure
Example: A file Copy Procedure Is In Progress
How Can I stop It
LVL 1
BalsheAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

mcriderCommented:
If you're talking about the VB FileCopy, you can't "break" that.  It's an internal command that doesn't return control back to VB until it has completed.

If you're talking about opening the file, and copying it your self, you need to look at a switch in your copy loop, and use DoEvents...

Example:

Global Inhibit as Boolean


INHIBIT=FALSE
Do while not eof(1)
   If INHIBIT=TRUE then exit do
   DoEvents
   'Read your file and copy some characters...
Loop

and in another control event, like a command key....

INHIBIT=TRUE


Cheers!
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic Classic

From novice to tech pro — start learning today.