Q
Quantum
Private Sub cmdUpdate_Click()
Dim objApp As Application
Dim objNS As NameSpace
Dim objCalender As MAPIFolder
Dim objItem As AppointmentItem
Dim strSubject As String
Dim intMinutes As Integer
Set objApp = CreateObject("Outlook.Application")
Set objNS = objApp.GetNamespace("MAPI")
Set objCalendar = objNS.GetDefaultFolder(olFolderCalendar)
intMinutes = 24 * 60 * txtDays.Value '<<<<<<<< error
For Each objItem In objCalendar.Items
strSubject = objItem.Subject
If InStr(strSubject, "Birthday") > 0 Or _
InStr(strSubject, "Anniversary") > 0 Then
objItem.ReminderSet = True
objItem.ReminderMinutesBeforeStart = intMinutes
objItem.Save
End If
Next
Beep
End Sub
Dim objApp As Application
Dim objNS As NameSpace
Dim objCalender As MAPIFolder
Dim objItem As AppointmentItem
Dim strSubject As String
Dim intMinutes As Integer
Set objApp = CreateObject("Outlook.Application")
Set objNS = objApp.GetNamespace("MAPI")
Set objCalendar = objNS.GetDefaultFolder(olFolderCalendar)
intMinutes = 24 * 60 * txtDays.Value '<<<<<<<< error
For Each objItem In objCalendar.Items
strSubject = objItem.Subject
If InStr(strSubject, "Birthday") > 0 Or _
InStr(strSubject, "Anniversary") > 0 Then
objItem.ReminderSet = True
objItem.ReminderMinutesBeforeStart = intMinutes
objItem.Save
End If
Next
Beep
End Sub