I used the sample code from MarcGraff, it is the best for my situation.
My code is below.
dim TmpStr() As String
TmpStr = Split(txtTicketDate.Text, "-")
TicketDate = CDate(TmpStr(1) & "-" & TmpStr(0) & "-" & TmpStr(2))
validYes = False
errMsg &= "Error Ticket Date : Shall be dd-mm-yyyy. Please try
again." + vbNewLine
The reason is that, it re-substring my date from dd/mm/yyyy to mm/dd/yyyy which is
suitable for the us-EN culture date-time format ("d").
As such, the CDate(expression) will work fine. else error if format is dd/mm/yyyy.
Thanks & Rgds