dan masukan script di bawah ini :
Private Sub Command1_Click()
If Combo1.ListIndex = -1 Then
MsgBox "harap isikan type interval", , "Konfirmasi"
Combo1.SetFocus
Else
If Combo1.ListIndex = 0 Then
interval = "yyyy"
ElseIf Combo1.ListIndex = 1 Then
interval = "m"
ElseIf Combo1.ListIndex = 2 Then
interval = "d"
End If
Text3.Text = DateAdd(interval, Val(Text2.Text), CDate(Text1.Text))
End If
End Sub
Private Sub Form_Load()
Combo1.AddItem "Tahun"
Combo1.AddItem "Bulan"
Combo1.AddItem "Hari"
End Sub
Tidak ada komentar:
Posting Komentar