tbollenbach
New Member
- Joined
- Sep 19, 2013
- Messages
- 7
I am using multiple userforms to gather info. I'm not using any worksheets.
I have a command button that creates an outlook task reminder that tells me what I need to close at a set time and date, 3 days from the time it was created, and it work great except I need it to not set any tasks on the weekend.
I'm thinking I need to set it for a 5 day work week , so a task created on friday will not count sat and sun as part of the 3 days.
Private Sub CommandButton1_Click()
Dim OLApp As Outlook.Application
Dim OLTk As Outlook.TaskItem
Set OLApp = New Outlook.Application
Set OLTk = OLApp.CreateItem(olTaskItem)
With CreateObject("Outlook.Application").CreateItem(3)
.Subject = "Test Subject"
.StartDate = Now
.DueDate = Now + 3
.ReminderTime = Now + 3
.Body = "This is a Test"
.ReminderSet = True
.Save
MsgBox "An Outlook Reminder Has been set"
End With
End Sub
I did not make this, I found it and adjusted it to work for what I need it to do....
any help would be appreciated
I have a command button that creates an outlook task reminder that tells me what I need to close at a set time and date, 3 days from the time it was created, and it work great except I need it to not set any tasks on the weekend.
I'm thinking I need to set it for a 5 day work week , so a task created on friday will not count sat and sun as part of the 3 days.
Private Sub CommandButton1_Click()
Dim OLApp As Outlook.Application
Dim OLTk As Outlook.TaskItem
Set OLApp = New Outlook.Application
Set OLTk = OLApp.CreateItem(olTaskItem)
With CreateObject("Outlook.Application").CreateItem(3)
.Subject = "Test Subject"
.StartDate = Now
.DueDate = Now + 3
.ReminderTime = Now + 3
.Body = "This is a Test"
.ReminderSet = True
.Save
MsgBox "An Outlook Reminder Has been set"
End With
End Sub
I did not make this, I found it and adjusted it to work for what I need it to do....
any help would be appreciated