Display the current date and time in the Title Bar

How to display the current date and time in the Title Bar using VBA

METHOD 1. Display the current date and time in the Title Bar using VBA

VBA

Sub Display_Current_Date_Time_in_Title_Bar()
'display the current date and time in the second caption of the Title Bar
Application.Caption = Now()
'clear the first caption of the Title Bar
ActiveWindow.Caption = Empty

End Sub

Explanation about how to display the current time in the Title Bar

EXPLANATION

EXPLANATION
This tutorial explains and provides step by step instructions on how to display the current date and time in the Title Bar. Using VBA this can be achieved by removing the first component of the Title Bar's caption and assigning the current time and date, through the Now() function, to the second component of the Title Bar's caption.

RELATED TOPICS

Related Topic Description Related Topic and Description
How to display the current date and time in the Title Bar when opening a workbook using VBA
How to display the current date and time in the Title Bar when a workbook was last saved using VBA