By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,647 Members | 1,124 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,647 IT Pros & Developers. It's quick & easy.

Display Date and Time on Status bar

100+
P: 134
Hi,
I am wondering is it possible to display current date and time on status bar or
display on a customize toolbar ?
Mar 18 '08 #1
Share this Question
Share on Google+
5 Replies


NeoPa
Expert Mod 15k+
P: 31,261
It's possible to use :
Expand|Select|Wrap|Line Numbers
  1. Dim strDT As String
  2.  
  3. strDT = Format(Now(), "d mmmm yyyy HH:nn:ss")
  4. Call Application.Echo(True, strDateTime)
You may want to set up this code (or similar) to run on a timer event.

NB. Be VERY careful about using the Application.Echo() method to disable screen updates.
Mar 18 '08 #2

100+
P: 134
It's possible to use :
Expand|Select|Wrap|Line Numbers
  1. Dim strDT As String
  2.  
  3. strDT = Format(Now(), "d mmmm yyyy HH:nn:ss")
  4. Call Application.Echo(True, strDateTime)
You may want to set up this code (or similar) to run on a timer event.

NB. Be VERY careful about using the Application.Echo() method to disable screen updates.
Thank you so much for your advise, I will try out your code.
Mar 19 '08 #3

ADezii
Expert 5K+
P: 8,607
Hi,
I am wondering is it possible to display current date and time on status bar or
display on a customize toolbar ?
  1. Set the Timer Interval Property of the Form = 1000
  2. Place the following 2 lines of code in the Form's Timer() Event (On Timer Property):
    Expand|Select|Wrap|Line Numbers
    1. Private Sub Form_Timer()
    2.   Dim retVal As Variant
    3.   retVal = SysCmd(acSysCmdSetStatus, Now())
    4. End Sub
  3. The Date and Time will be displayed every second in the following format:
    Expand|Select|Wrap|Line Numbers
    1. 3/18/2008 10:32:08 PM 
Mar 19 '08 #4

100+
P: 134
  1. Set the Timer Interval Property of the Form = 1000
  2. Place the following 2 lines of code in the Form's Timer() Event (On Timer Property):
    Expand|Select|Wrap|Line Numbers
    1. Private Sub Form_Timer()
    2.   Dim retVal As Variant
    3.   retVal = SysCmd(acSysCmdSetStatus, Now())
    4. End Sub
  3. The Date and Time will be displayed every second in the following format:
    Expand|Select|Wrap|Line Numbers
    1. 3/18/2008 10:32:08 PM 
Thanks you so much for the coding
Mar 19 '08 #5

ADezii
Expert 5K+
P: 8,607
Thanks you so much for the coding
You are quite welcome.
Mar 19 '08 #6

Post your reply

Sign in to post your reply or Sign up for a free account.