Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Run Macro at specified times

Status
Not open for further replies.

johnv20

Programmer
Sep 26, 2001
292
US
Hi,
I know practically nothing about VB so please bear with me if this is a very inane question.

I have a perl pgm which uses a dde poke into an excel
worksheet, I have also created a macro running on this sheet which uses a dde poke using the same topic name to put this data into a plc.

The problem is that while both run fine if run manually
one after the other when I try to get them to run continuosly (using application.wait in the macro to loop) the macro is blocking the dde poke from the perl pgm.

Is there any way to get a macro to run say every 30 secs without locking the excel sheet in the process ?

Thanks


 
Hi
Try using the OnTime method.

I've never used it so can offer no further advice but have a look at the help file - it appears helpful!

;-) If a man says something and there are no women there to hear him, is he still wrong? [ponder]
 
You might also try adding doevents in the loop.
 
Hi,
thanks for your help - I've cheated a little and
just used the perl file to carry out both dde pokes
so no macro is needed

John
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top