+ Reply to Thread
Results 1 to 5 of 5

next without For

  1. #1
    Registered User
    Join Date
    10-24-2019
    Location
    montreal
    MS-Off Ver
    2013
    Posts
    3

    next without For

    Hi

    I am trying to create a VBA to clear a list with specific works.
    I am having this issue:
    Next without For.

    Anybody could help me.
    Thanks

    Please Login or Register  to view this content.
    Attached Files Attached Files
    Last edited by Pepe Le Mokko; 10-24-2019 at 11:22 AM.

  2. #2
    Forum Expert Keebellah's Avatar
    Join Date
    01-12-2014
    Location
    The Netherlands
    MS-Off Ver
    Office 2021 (Windows)
    Posts
    7,905

    Re: next without For

    Please use code tags when entering code. (read the forum rules)
    The error you mention is exactly that there is a For statement but there is no Next or v.v. or there is an If with no End If

    Check the lop for b = 1 to 300 and you'll see it

    That's called troubleshooting.
    ---
    Hans
    "IT" Always crosses your path!
    May the (vba) code be with you... if it isn't; start debugging!
    If you like my answer, Click the * below to say thank-you

  3. #3
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,448

    Re: next without For

    Administrative Note:

    Welcome to the forum.

    We would very much like to help you with your query, however you need to include code tags around your code.

    Please take a moment to add the tags. 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, and it also maintains VBA formatting.

    Please see Forum Rule #2 about code tags and adjust accordingly. Click on Edit to open your post, then 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

    I did it for you this time. Please read forum rules. Thanks

  4. #4
    Registered User
    Join Date
    10-24-2019
    Location
    montreal
    MS-Off Ver
    2013
    Posts
    3

    Re: next without For

    Thanks!

    I had it swapped!

  5. #5
    Forum Expert Keebellah's Avatar
    Join Date
    01-12-2014
    Location
    The Netherlands
    MS-Off Ver
    Office 2021 (Windows)
    Posts
    7,905

    Re: next without For

    Well. glad it helped, it's never as bad as you think, but it's always hidden in a place you don't expect

+ 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