I'm trying to set an email reminder to fire at 3pm on a date specified in the ctl_lbl_DueDateValue label on a user form.
I can't seem to get this to work. Anyhelp would be appreciated. Thanks! (Using Outlook and Excel '03)
I can't seem to get this to work. Anyhelp would be appreciated. Thanks! (Using Outlook and Excel '03)
Code:
Sub SendEmail(EmailContent As String)
Dim OutlookApp As Object
Dim EmailContent As String
Dim duedateval As Date
Const olMailItem = 0
Set OutlookApp = CreateObject("Outlook.Application")
With OutlookApp.CreateItem(olMailItem)
.To = ""
.Subject = "Operational Risk - Key Risk Metric Data Entry Due"
.Body = EmailContent
.attachments.Add ThisWorkbook.FullName
.importance = 2
.ReminderSet = True
.ReminderTime = "15:00"
duedateval = form_UI.ctl_lbl_Duedatevalue
.duedate = Now
.Display
End With
End Sub