View Single Post
  #8   Report Post  
Posted to microsoft.public.excel.misc
Jacob Skaria Jacob Skaria is offline
external usenet poster
 
Posts: 8,520
Default Creating Appointment

Dan, try the below.........

Sub OLApp()

Dim objOL As Object, objApp As Object, lngRow As Long

Set objOL = CreateObject("Outlook.Application")

For lngRow = 1 To Cells(Rows.Count, "A").End(xlUp).Row
Set objApp = objOL.CreateItem(1)
With objApp
.Subject = "Change Password for system" & Range("A" & lngRow)
.Start = Range("B" & lngRow)
.ReminderPlaySound = True
.Save
End With
Next

Set objOL = Nothing
End Sub


--
Jacob (MVP - Excel)


"Dan Wood" wrote:

How stupid can i be!! The date wasn't formatted correctly.

Thank you for that. Next question is:-

How can i set this macro to perform the same actions for multiple cells? So
if coloum A had a list of system names, and coloum B has a list of various
dates, how can the macro scroll down and create the appointments?