Private Sub Command1_Click() Dim d1 As Date Dim d2 As Date d1 = #1/1/2016# d2 = #12/31/2016# MsgBox DateDiff("yyyy", d1, d2) End Sub