By using t2do.com you agree to our cookie policy, We and our partners operate globally and use cookies, for multiple purposes

 


Monitor a process or wait for event

For Excel to do batch or monitoring type of work it must wait and check for data in a loop.

It's better coding to have an event that kicks off code but this isn't always possible.

For full batch the Windows Job Scheduler is useful to open the Excel file and the auto_open or Workbook_open event can start running the code.

Some issues to deal with are:
  • waiting without taking up too many resources
  • How often to check for incoming data
  • How to send back results
  • Making sure Msgbox or errors doesn't stop the code
  • Being able to monitor the batch process
  • Dealing with the case when you open an Excel file and you don't want it to open in the batch window
  • Using computer while batch process is running


  •