Private Sub CommandButton1_Click()
Application.ScreenUpdating = False
On Error Resume Next
Dim dtTdy As Date, dtDob As Date
dtDob = TextBox1.Value: dtTdy =
TextBox2.Value
TextBox3.Value = DateDiff("d",
dtDob, dtTdy) & " : Hari"
TextBox4.Value = DateDiff("m",
dtDob, dtTdy) & " : Bulan"
TextBox5.Value = DateDiff("yyyy",
dtDob, dtTdy) & " : Tahun"
TextBox6.Value = DateDiff("q",
dtDob, dtTdy) & " : Kwartal"
TextBox7.Value = DateDiff("ww",
dtDob, dtTdy, vbSunday) & "
: Minggu"
Application.ScreenUpdating = True
End
Sub
No comments:
Post a Comment