A
Al & Cay Grant
Hi guys,
I have a simple peice of code;
Private Sub TextBox4_Exit(ByVal Cancel As MSForms.ReturnBoolean)
age = DateDiff("yyyy", TextBox4, Now)
TextBox5.Value = age
End Sub
It calculates the age in years between NOW and a Date of Birth in Textbox4.
I want to set error handling so that the rest of the procedures still run
if;
(a) Incorrect DOB format is entered -or-
(b) No no DOB entered
Anyone know how to do this? I guess I need something that handles a
datediff error and just keeps running, instead of putting the age in TextBox
5
it will just leave it blank.
Cheers
- Al
I have a simple peice of code;
Private Sub TextBox4_Exit(ByVal Cancel As MSForms.ReturnBoolean)
age = DateDiff("yyyy", TextBox4, Now)
TextBox5.Value = age
End Sub
It calculates the age in years between NOW and a Date of Birth in Textbox4.
I want to set error handling so that the rest of the procedures still run
if;
(a) Incorrect DOB format is entered -or-
(b) No no DOB entered
Anyone know how to do this? I guess I need something that handles a
datediff error and just keeps running, instead of putting the age in TextBox
5
it will just leave it blank.
Cheers
- Al