How to check the date_from.value validation before OKrun? where return to error:6 in case of input 20040825 on the textbox.
Private Sub OKrun_Click()
'Check date textbox
If data_from.Value = Empty Or (Not IsDate(data_from.Value)) Or data_from.Value <> Format(data_from.Value, "yyyy/mm/dd") Then
MsgBox "Please input data format as yyyy/mm/dd then OK。", vbCritical, "Input error"
data_from.Value = Format(Range("A2").Value, "yyyy/mm/dd") 'default value
GoTo reload_form
End If
...
Unload SettingForm
reload_form:
End sub
Bookmarks