+ Reply to Thread
Results 1 to 6 of 6

Getting compile error ‘For control variable already in use’

  1. #1
    Forum Contributor
    Join Date
    06-29-2014
    Location
    India
    MS-Off Ver
    2010 Windows 10 64 bits
    Posts
    1,269

    Getting compile error ‘For control variable already in use’

    Hi friends,
    I want to create a progress card of each student.
    The number of students is varies from division to division.
    The marks of each student are retrieving from ‘Result’ sheet.
    The grace marks after + sign should be superscript. Range ‘a:I and column m’
    Subjects s1 to s9 and total

    I’m getting compile error:
    ‘For control variable already in use’

    Any help will be appreciated.

    Thanking you in anticipation.
    Attached Files Attached Files
    Sincerely,

    mso3

  2. #2
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Getting compile error ‘For control variable already in use’

    The first loop doesn't have a Next.
    If posting code please use code tags, see here.

  3. #3
    Forum Expert
    Join Date
    08-28-2014
    Location
    Texas, USA
    MS-Off Ver
    2016
    Posts
    1,796

    Re: Getting compile error ‘For control variable already in use’

    Yup, was just posting the same thing. Add a next as follows:

    Please Login or Register  to view this content.

  4. #4
    Forum Contributor
    Join Date
    06-29-2014
    Location
    India
    MS-Off Ver
    2010 Windows 10 64 bits
    Posts
    1,269

    Re: Getting compile error ‘For control variable already in use’

    Hi both of you,
    Thank you. The error has gone but I'm not getting the marks of all students. Only I'm getting marks of the first number.

    How to get the marks of all the students?
    Please suggest me a amendment in the code to get the marks of all the students.

    Sorry for trouble.

    Thanking you,

  5. #5
    Forum Expert
    Join Date
    08-28-2014
    Location
    Texas, USA
    MS-Off Ver
    2016
    Posts
    1,796

    Re: Getting compile error ‘For control variable already in use’

    For me, it would be easier for you to describe and show and example workbook of a before and after, and then I could write the code for you. Your coding style is not mine, and I'm having difficulty understanding what your code is trying to do.

    That being said, maybe @Norie or another user can be of help without all that.

  6. #6
    Forum Contributor
    Join Date
    06-29-2014
    Location
    India
    MS-Off Ver
    2010 Windows 10 64 bits
    Posts
    1,269

    Re: Getting compile error ‘For control variable already in use’

    Deleted.

    Thank you. Solved.
    Last edited by mso3; 03-25-2015 at 08:27 PM.

+ 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. Getting compile error 91 object variable with block variable not set
    By mso3 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 02-14-2015, 08:30 PM
  2. [SOLVED] Debugging - Compile error: Invalid Next control variable reference
    By xxgirlinbluexx in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 06-26-2013, 08:14 AM
  3. Compile Error: Invalid Next Control Variable Reference
    By mlegge04 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 09-25-2012, 02:38 PM
  4. compile error: For control variable already in use
    By adam2308 in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 09-24-2012, 01:12 PM
  5. Compile Error: For Control Already In Use
    By ruckuz in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 12-31-2010, 05:25 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