VBA – Date Function

  • Post author:
  • Post category:VBA
  • Post comments:0 Comments
 Function returns

The Function returns the current system date.

Syntax

date()

Example

Add a button and add the following function.

Private Sub Constant_demo_Click()
   Dim a as Variant
   a = date()
   msgbox "The Value of a : " & a
End Sub

When you execute the function, it produces the following output.

The Value of a : 19/07/2014 

Previous Page:-Click Here

Leave a Reply