Private Sub cmda_Click()
If IsDate(txta.Text) Then
    txtd.Text = Format(CDate(txta.Text), "dd/mm/yyyy")
  Else
    MsgBox txtd.Text & " is not a date format!"
  End If
End Sub
If txta.Text is 23/11/79
txtd.text = 23/11/1979
If txta.Text is 05/11/79
txtd.text = 11/05/1979
If txta.Text is 01/02/03
txtd.text = 03/02/2001
How to correction ?
arrow
arrow
    全站熱搜

    vbqa 發表在 痞客邦 留言(1) 人氣()