' Variables Dim dInvDate As Date ' Trap Errors Try ' Attemp Convert dInvDate = CDate(txtInvoice.Text) ' Assign Date txtInvoice.Text = Format(dInvDate, "dd-mm-yyyy") Catch ' Alert User txtInvoice.Text = "Invalid Date" End Try