• Think i already know the answer to this, but can you use letters instead of numbers in a FOR-Next-LOOP? Tried to get it to work a couple of different ways but couldn't get it, thought i would ask.

    FOR I = A to J
    Next I

    Thnak you

    [SIZE="6"][FONT="Comic Sans MS"]Brain G.[/FONT][/SIZE] :loopain:

  • Re: For-Next-Loop


    If you want letters you will need to modify the syntax.
    Using double quotes fails and sinlge quotes act as comments.
    [vba]Sub x()
    Dim i
    For i = Asc("A") To Asc("J")
    Debug.Print Chr(i)
    End Sub[/vba]


Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!