Macro to Display Time in Status Bar in Excel

Last reviewed: November 4, 1994
Article ID: Q63134

SUMMARY

The following Microsoft Excel macro will display the current time in the status bar. The time will be updated every minute. This macro will run every minute until interrupted by pressing the ESC key.

   A1: =MESSAGE(TRUE,TEXT(NOW(),"h:mm"))
   A2: =ON.TIME(NOW()+0.00069,"Time.xlm!time")
   A3: =RETURN()

It is assumed that the macro sheet is named "Time.XLM" and that Cell is defined as "time". The time format "h:mm" can be changed to the desired format.


Additional reference words: 2.0 2.00 2.01 2.1 2.10 3.0 3.00


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: November 4, 1994
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.