DateAdd Function Example

The example takes a date and displays a corresponding date a specified number of days in the future.  To try this example, draw two text boxes, a label, and a command button on a new form.  Set the AutoSize property of the Label to True.  Paste this code over the Form_Load procedure and then press F5 to run the program.

Sub Command1_Click ()
  Label1.Caption = "New date: " & DateAdd("d", Text2.Text, Text1.Text)
End Sub