Hi,
Have a read of Chip's page on OnTime
http://www.cpearson.com/excel/OnTime.aspx
Cheers
Andy
Kevin wrote:
I have written code into a Workbook Open module.
Application.OnTime aTime2, Procedu="closeFile2"
the problem is, if I set it up to close after 1 minute but close it manually
before this time. It seems that after 1 minute even though the workbook is
close it executes above anyway and opens up the file again (and automatically
shuts it) - in a loop
I presume I am missing a lone of code that only executes above if the file
is open?
--
Andy Pope, Microsoft MVP - Excel
http://www.andypope.info