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

60 Things That Excel Can Do



Feature 27 - Monitor for an Event


Excel via VBA can monitor for an event.

your code could loop and every 60 seconds check for some event. Some examples are:
  • File is created on a network drive
  • Database table gets a specific value
  • Space used on computer exceeds some specified value
  • Some time is passed and you want computer to perform some task
  • Every 15 seconds chart the trend of some value, ex. size of a log file
  • Send an email if a file wasn't received by a specific time
  • Prompt user to enter what they worked on for the last 15 minutes

    The VBA code looks something like:

    Do
        if Filesize("c:\alogfile.txt") > 1,000,000,000 then
           email "Admin@Listi.net","Your file as exceeded 1 Gigabyte"
           exit do
        end if
        
        Delay 1 ' delays 1 second
    Loop




    Could also rename the file and create a new one.

  •    ←Trader Analyzer | →Questionnaire | Table of Contents | Send us your feedback | Random | © 2025 All Rights Reserved | Edit