+ Reply to Thread
Results 1 to 5 of 5

Select Last Used Cell for VBA Range

  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:

    Please Login or Register  to view this content.
    Last edited by stevedes7; 01-03-2010 at 03:38 AM.

  2. #2
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,259

    Re: Select Last Used Cell for VBA Range

    Hello stevedes7,

    Do you really mean the last whose data has changed or the last in the column with data?
    Sincerely,
    Leith Ross

    Remember To Do the Following....

    1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.
    2. Thank those who have helped you by clicking the Star below the post.
    3. Please mark your post [SOLVED] if it has been answered satisfactorily.


    Old Scottish Proverb...
    Luathaid gu deanamh maille! (Rushing causes delays!)

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

    Re: Select Last Used Cell for VBA Range

    Hey Leith,

    Last row of data in the column.

    Or to be more specific, each cell in the last row of data. In this scenario, the last row of data is in Row 500. In this case, B500, C500, D500, E500, F500, etc are used.
    Last edited by stevedes7; 01-03-2010 at 04:12 AM.

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

    Re: Select Last Used Cell for VBA Range

    Is this what you mean?
    Please Login or Register  to view this content.
    Note your code will only work if the data sheet is active
    Hope that helps.

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

    Free DataBaseForm example

  5. #5
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,259

    Re: Select Last Used Cell for VBA Range

    Hello stevedes7,

    This version of the macro looks only at columns "B" to "G" and finds the last cell in these columns only.
    Please Login or Register  to view this content.

+ 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