Private Sub TextBox1_Exit(ByVal Cancel As MSForms.ReturnBoolean)
With Me.TextBox1
If IsDate(.Value) Then
.Value = Format(DateValue(.Value, "dd/mm/yyyy")
Else
MsgBox "Please enter a valid date.", vbInformation, "Invalid date"
Cancel = True
End If
End With
End Sub
you want me to change any property of textbox from the property window?If it is when you double click it you will see the Change event but you should also be able to select it's other events e.g. Exit from the right hand dropdown above the code window.