Assigning a calender event

Goody61865

Board Regular
Joined
Mar 4, 2011
Messages
50
I have a code that updates a calender event with a due date and it works great. My problem is I dont know how to assign the event to another email address, it only updates the calender of the person entering the dates. Is there a way to update another users calender?

Here is my code:

Sub Update_Calender(FormulaCell As Range)
Dim objOL As Object
Dim objItem As Object
Dim lngRow As Long
Set objOL = CreateObject("Outlook.Application")
lngRow = 4
Dim oSheet As Worksheet
Set oSheet = ThisWorkbook.Worksheets("GanttChart")
If oSheet.Cells(lngRow, 2).Text <> "" Then
Set objItem = objOL.CreateItem(1) ' constant olAppointmentItem = 1

With objItem
.Body = oSheet.Cells(FormulaCell.Row, "B").Value & vbNewLine & vbNewLine & _
"Your task is due : " & oSheet.Cells(FormulaCell.Row, "A").Value & _
vbNewLine & vbNewLine & "Please update your task"
.Duration = 60
.Start = oSheet.Cells(FormulaCell.Row, "D").Value & " 9:00:00 AM"
.Subject = oSheet.Range("B4").Value
.ReminderMinutesBeforeStart = "30"
.Save
End With
End If
lngRow = lngRow + 1
Set objItem = Nothing
Set objOL = Nothing
'MsgBox "Your due date for this task has been added to your calender"
End Sub
 

Excel Facts

What do {} around a formula in the formula bar mean?
{Formula} means the formula was entered using Ctrl+Shift+Enter signifying an old-style array formula.

Forum statistics

Threads
1,224,583
Messages
6,179,682
Members
452,937
Latest member
Bhg1984

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top