Oprichnick
Board Regular
- Joined
- May 30, 2013
- Messages
- 69
Hello, with some book help, I wrote this code:
However, now I want to set the alarm using an InputBox or preferably a Userform... But I'm clueless... Stay Good
Code:
Sub Data()
Dim dtime As Date
Dim Ans As Integer
Ans = MsgBox("Have you transfered the data today?", vbYesNoCancel)
If Ans = vbYes Then
MsgBox ("Ok, Keep Your Work")
ElseIf Ans = vbCancel Then
Exit Sub
Else
MsgBox ("Please transfer data")
End If
End Sub
Sub DataReminder()
Dim dta As String
dta = MsgBox("Do you want to turn the data transfer alarm on?", vbYesNo)
Select Case Lch
Case vbYes
GoTo DataTransfer
Case vbNo
Exit Sub
End Select
DataTransfer:
Application.OnTime TimeSerial(1, 3, 0), "Data"
End Sub
Sub Workbook_BeforeClose(Cancel As Boolean)
dtime As Date
Application.OnTime dtime, "Data", False
End Sub