+ Reply to Thread
Results 1 to 3 of 3

Excel Macro - Linking dates from Excel to a Shared Outlook Calendar

  1. #1
    Registered User
    Join Date
    08-16-2011
    Location
    Edmonton, Canada
    MS-Off Ver
    Excel 2010
    Posts
    20

    Excel Macro - Linking dates from Excel to a Shared Outlook Calendar

    Hi,

    I'm completely new to VBA and have come across codes to link dates in an Excel spreadsheet to create reminders/tasks for due dates on a shared Outlook calendar, but am unsure as to how to customize those generalized codes to work for my particular spreadsheet.

    I'm looking for a step-by-step breakdown of how to modify the fields in the VBA code so that I can understand how to translate this function to other spreadsheets as well.

    Thanks!

  2. #2
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Excel Macro - Linking dates from Excel to a Shared Outlook Calendar

    How can we help without seeing the code?
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  3. #3
    Registered User
    Join Date
    08-16-2011
    Location
    Edmonton, Canada
    MS-Off Ver
    Excel 2010
    Posts
    20

    Re: Excel Macro - Linking dates from Excel to a Shared Outlook Calendar

    I don't have a code to start with at the moment - I don't even know where to start to make this work. I came across this code in my research:

    Private Sub AddToOLCalendar()

    Dim objOL As Object
    Dim objItem As Object
    Dim lngRow As Long

    Set objOL = CreateObject("Outlook.Application")

    lngRow = 4
    Do While ActiveSheet.Cells(lngRow, 1) <> ""
    If ActiveSheet.Cells(lngRow, 2).Text <> "" Then
    Set objItem = objOL.CreateItem(1) ' constant olAppointmentItem = 1

    With objItem
    .Body = "Message"
    .Duration = 10
    .Start = Range("B4") & " 9:00:00 AM"
    .Subject = "Subject Text"
    .Save
    End With
    End If
    lngRow = lngRow + 1
    Loop
    Set objItem = Nothing
    Set objOL = Nothing

    End Sub

    I'm not even sure if this code would work or not, just having looked into some other questions that people have asked, this is the only code that I've found so far.

    I'm sorry, I'm new to VBA and really have no idea how to use the tool properly.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1