VBA - Fonction de date

La fonction renvoie la date système actuelle.

Syntaxe

date()

Exemple

Ajoutez un bouton et ajoutez la fonction suivante.

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

Lorsque vous exécutez la fonction, elle produit la sortie suivante.

The Value of a : 19/07/2014