Sub AnotherDayPicker1_Closed (Cancelled As Boolean, Date As Long)
If Cancelled Then Return ' se ha cancellato, non fare alcunché.
If Date < DateTime.Now Then ' la data selezionata dev'essere precedente a quella odierna (perché non anche uguale?)
Main.insertedDate = Date ' Dichiara insertedDate come Long, non serve che sia una stringa
okButton.Enabled = True
Else
okButton.Enabled = False
If Main.language = "it" Then
Msgbox("Devi inserire solo una data anteriore a oggi", "ATTENZIONE!")
Else If Main.language = "es" Then
Msgbox("Solo tienes que introducir una fecha anterior a hoy", "¡ATENCIÓN!")
Else
Msgbox("You must enter only a date before to today "," ATTENTION!")
End If
End If
End Sub