Hello,

I am getting an Error 6 overflow, when I enter in my userform a date like this 01.01.20133. After I press enter or tab in the userform the error occurs and the debugger goes to the code shown below.

I don't understand why I am getting this error. I don't know if this occured before or if I just never entered the date incorrectly like that.
However it is quite a nuisance to have the userform crash only because a number is wrong.

Can I do something to keep the formatting and also prevent crashing of the userform?

Kind Regards
Prexcel


Private Sub tbtcmqs_BeforeUpdate(ByVal Cancel As MSForms.ReturnBoolean)
    Me.tbtcmqs = Format(tbtcmqs, "DD-MMM-YYYY")
End Sub