Results 1 to 5 of 5

Select Last Used Cell for VBA Range

Threaded View

  1. #1
    Registered User
    Join Date
    08-26-2009
    Location
    London, England
    MS-Off Ver
    Excel 2003
    Posts
    53

    Select Last Used Cell for VBA Range

    I am using VBA in excel to send Outlook Meeting Requests. The coding works perfectly for sending the requests, so there are no issues with the actual macro.

    My issue is directing the macro to select the last edited cell in Columns B, C, D, etc to prefill the meeting request. Currently I'm just copying the last edited cells to B1, C1, D1, E1, and F1, but I wish I could just direct the program to look at the bottom of the spreadsheet.

    The code is as follows:

    Sub SendMeetingRequest()
    
        Dim olApp As Outlook.Application
        Dim olApt As AppointmentItem
    
        Set olApp = New Outlook.Application
        Set olApt = olApp.CreateItem(olAppointmentItem)
    
        With olApt   
            .Start = Range("F2") + Range("G2")
                .End = .Start + TimeValue("00:30:00")
                .Subject = Range("B2") + Range("C2") + Range("D2")
               .Location = ""
               .Body = Range("E2")
            .BusyStatus = olBusy
                .ReminderMinutesBeforeStart = 30
            .ReminderSet = True
               .RequiredAttendees = "email@emailaddress.com"
            .Send
        End With
    
        Set olApt = Nothing
        Set olApp = Nothing
    
    End Sub
    Last edited by stevedes7; 01-03-2010 at 03:38 AM.

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