+ Reply to Thread
Results 1 to 3 of 3

potential collections help

  1. #1
    Registered User
    Join Date
    10-22-2014
    Location
    Cincinnati
    MS-Off Ver
    2013
    Posts
    12

    potential collections help

    Hello all,

    I am pulling emails from outlook based on a date range that a user selects and putting the body of the email inside excel. The code I have accurately determines the number of emails in a given range (iRow value = 5 ) and then pulls 5 emails. The issue is that it does not pull those 5 emails that was within range (Restrict method), instead it pulls the first five emails in the folder which has 20 total emails. It would be greatly appreciated for some help on this. My thinking is that I have to use the Restrict method to put the emails in a collection and then do
    For Next loop to get the body of each of the 5 emails into a cell. Thank you!


    Please Login or Register  to view this content.
    Last edited by Apollo4life; 11-19-2014 at 08:49 AM.

  2. #2
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: potential collections help

    Your post does not comply with Rule 3 of our Forum RULES. Use code tags around code.

    Posting code between [CODE]Please [url=https://www.excelforum.com/login.php]Login or Register [/url] to view this content.[/CODE] tags makes your code much easier to read and copy for testing, it also maintains VBA formatting.

    Highlight your code and click the # icon at the top of your post window. More information about these and other tags can be found here

    * you omitted the last [
    If I've helped you, please consider adding to my reputation - just click on the liitle star at the left.

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~(Pride has no aftertaste.)

    You can't do one thing. XLAdept

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~aka Orrin

  3. #3
    Registered User
    Join Date
    10-22-2014
    Location
    Cincinnati
    MS-Off Ver
    2013
    Posts
    12

    Re: potential collections help

    Thank you very much xladept, I thought I selected it, but obviously didn't.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Collections within class module collections
    By AndyLitch in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-14-2013, 06:00 AM
  2. Areas collections
    By busdani in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 05-09-2009, 11:50 AM
  3. Returning collections?
    By clintonf in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-26-2008, 12:58 PM
  4. Collections problem
    By John in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 06-21-2006, 01:25 PM
  5. Formula How to add potential nos
    By Wilie Loh in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 03-19-2006, 10:48 AM

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