+ Reply to Thread
Results 1 to 3 of 3

invalid next control error

  1. #1
    Registered User
    Join Date
    12-13-2011
    Location
    Ireland
    MS-Off Ver
    Excel 2013
    Posts
    6

    invalid next control error

    Hi All,
    Hoping someone can help. I am very new to VBA programming and am trying to write a macro which compares two lists (comparerange1 and 2) and if it finds a match takes a value from two columns over in comparerange1 and enters it into the first available row f column F in a specified worksheet. I have copied the macro below which I've pasted from varous examples I've found. I'm getting an invalid next control error at the next Y line. Can anyone help me figure the problem. Hope its an easy one!


    Code:
    Please Login or Register  to view this content.
    Cheers
    Paul

    nb code tags now added.
    Last edited by pjmsimmons; 12-14-2011 at 05:46 AM. Reason: add code tags

  2. #2
    Forum Expert
    Join Date
    01-15-2007
    Location
    Brisbane, Australia
    MS-Off Ver
    2007
    Posts
    6,591

    Re: invalid next control error

    Paul

    you are missing the next statement for the wsSheet loop.

    Also, can you please edit your post and attach the code tags.

    rylo

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

    Re: invalid next control error

    Your post does not comply with Rule 3 of our Forum RULES. Use code tags around code. Posting code without them makes your code hard to read and difficult to be copied for testing. Highlight your code and click the # at the top of your post window. For more information about these and other tags, found here
    Hope that helps.

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

    Free DataBaseForm example

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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