I had been hating write the code about date & time format. There are a problem as following code, I had tried to using Cdate, DateValue, Val...but not work,anyone solve it. Thks.
Code:
Sub default_value()
Dim fmt As String
fmt = "hh:mm:ss yyyy/mm/dd"
With Start_date
.Enabled = True: .Value = Date 'default today
End With
data_from.Caption = Format(Application.Min(Range("A:A") + Start_date.Value), fmt) 'wrong code ?
data_end.Caption = Format(Application.Max(Range("A:A") + Start_date.Value), fmt)
End Sub