Stopping an excel macro while it is running.

  • Thread starter Thread starter Tiggaz
  • Start date Start date
T

Tiggaz

I have written a macro for a uni project.

It takes in values from a GPS (location) and A/D converter (signa
strangth).
It records these values once a second in a loop.

I want the user to be able to stop running this program whenever the
have
enough data.

Please Help Me!

Thankyou in advance..
 
Hi,
I don't know what you are using to capture the GPS and A/D converter, but
many of the industry ship software control and many as OLE Objects.

Assuming some OLEObject were shipped, instead of looping in a vba loop and
request values every second, you could a object, say oGPS that you would set
to 1 second and the object would Tick every second. By capturing and
processing the event only, there would be no loop and the user could continue
to work or do whatever such as stopping the recording process.

If you don't have such software, you could create a timer that only run the
recording macro every second. See:
http://www.cpearson.com/excel/ontime.htm

Regards,
Sebastien
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top