+ Reply to Thread
Results 1 to 3 of 3

Compile Error: For Without Next

  1. #1
    Registered User
    Join Date
    05-15-2013
    Location
    Sydney
    MS-Off Ver
    Excel 2007
    Posts
    5

    Compile Error: For Without Next

    Hi

    I want to export some content from emails and have 2 issues, the first more pressing one is the Compile Error: For Without Next, I'm not even sure if the code works up until that point as haven't been able to test it. I'm hoping it looks through the emails and returns the date stamp of the emails as well as the content.

    The 2nd issue is it isn't returning the Comments, I'm guessing this is because they are on the line underneath "comments:" and I"m not sure how to update.

    Thanks in advance for your help.

    This is the email format

    Rating: 1
    Reasons: Reason
    Successful visit: no
    Comments:
    Comments Comments Comments



    This is the code I have


    Please Login or Register  to view this content.
    Last edited by boolucy1984; 05-16-2013 at 01:54 AM.

  2. #2
    Forum Guru HaHoBe's Avatar
    Join Date
    02-19-2005
    Location
    Hamburg, Germany
    MS-Off Ver
    work: 2016 on Win10 (notebook), private: 2019 on Win10 (desktop), 2019 on Win11 (notebook)
    Posts
    8,197

    Re: Compile Error: For Without Next

    Hi, boolucy1984,

    welcome to ExcelForum.

    we would like to help but your post does not comply with Rule 3 of our Forum RULES. Use code tags around code.

    Posting code in [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

    Ciao,
    Holger
    Use Code-Tags for showing your code: [code] Your Code here [/code]
    Please mark your question Solved if there has been offered a solution that works fine for you

  3. #3
    Forum Contributor
    Join Date
    12-28-2012
    Location
    Mumbai - India
    MS-Off Ver
    Excel
    Posts
    145

    Re: Compile Error: For Without Next

    Like we are ending
    IF with END IF
    SUB with END SUB
    WITH with END WITH

    Please Close all "FOR" with "NEXT" in your code

+ 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