Consulting

Results 1 to 3 of 3

Thread: Invalid Next Control Variable Reference

  1. #1

    Invalid Next Control Variable Reference

    What am I doing wrong here, in the end of this script:
    invalid.JPG
    The best part of the work out? The End

  2. #2
    Distinguished Lord of VBAX VBAX Grand Master xld's Avatar
    Joined
    Apr 2005
    Posts
    25,086
    Location
    Your next element is a label, not the control item. Change it to
        Next lngIndexlbl
    ____________________________________________
    Nihil simul inventum est et perfectum

    Abusus non tollit usum

    Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
    James Thurber

  3. #3
    This looks like one of my code sequences. The problem is that there is a line break missing in your code. There should be a line break between lngIndex and lbl_Exit:
    Thus
        Next lngIndex
    lbl_Exit:
    Where did you copy it from as it may need correction there?
    Graham Mayor - MS MVP (Word) 2002-2019
    Visit my web site for more programming tips and ready made processes
    http://www.gmayor.com

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •