Results 1 to 5 of 5
  1. #1
    Gold Lounger
    Join Date
    Jan 2004
    Location
    Italy
    Posts
    3,245
    Thanks
    0
    Thanked 0 Times in 0 Posts

    For next back (2000 sr 1)

    i have a for next cicle naturally it increase from 1 to the next ...
    but is possible to increse to the nack the cicle...

    example normal is
    for x = 45000000 to 45999999
    normally the first next with this cicle is 450000001

    i want
    for x = 45999999 to 450000000
    next 45999998

    hope understand me...

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: For next back (2000 sr 1)

    Use

    For x = 45999999 To 450000000 Step -1
    ...
    Next x

  3. #3
    Uranium Lounger
    Join Date
    Jan 2001
    Location
    South Carolina, USA
    Posts
    7,295
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: For next back (2000 sr 1)

    A quick check of the Excel Hepl would get you this:

    For...Next Statement


    Repeats a group of statements a specified number of times.

    Syntax

    For counter = start To end <font color=red> [Step step]</font color=red>
    [statements]
    [Exit For]
    [statements]

    Next [counter]

    The For
    Legare Coleman

  4. #4
    Gold Lounger
    Join Date
    Jan 2004
    Location
    Italy
    Posts
    3,245
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: For next back (2000 sr 1)

    good explain....
    Tks.

  5. #5
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: For next back (2000 sr 1)

    Legare's point was that you could have found this easily yourself (and in Italian!) by clicking in the word For in the Visual Basic Editor and pressing F1.

Posting Permissions

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