View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Andy Pope Andy Pope is offline
external usenet poster
 
Posts: 2,489
Default Problem with Auto Close module

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