Setting A variable name From Loop
Your problem is your loop may never end and it will loop forever. Zone and
Zone number only change when the IF condition is true. If you don't get into
the IF statement you end up in an endless loop. I can't tell wha you are
trying to do with this code so I can't recommend a solution.
"ironhydroxide" wrote:
Hello,
I am trying to set a few variables within a loop, The loop function is for
the variables specifically.
I would like something to this effect
------------------------------------------------------------------------------------------------
ZoneNumber = 1
ZoneFromRow = 2
"Zone"& ZoneNumber = Cells(ZoneFromRow, 4)
Do
ZoneFromRow = ZoneFromRow + 1
If Cells(ZoneFromRow, 4) < "Zone" & ZoneNumber(variable) Then
ZoneNumber = ZoneNumber + 1
"Zone"& ZoneNumber=Cells(ZoneFromRow, 4)
End If
Loop Until "Zone" & ZoneNumber = ""
------------------------------------------------------------------------------------------------
Apparently i am doing this wrong. If someone could please inform me on how
to properly dimension this (these) variable(s) I would be greatly apreciative.
Thanks
Ironhydroxide
|