Jim Dean![]() Sage ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3433 Joined: 3/13/2006 Location: L'ville, GA ![]() | Two things PigsFlyingLimit is not defined Although I rarely use Do While, as I recall the proper exit is End Loop I trust you realize the logic is redundant ... it would be tighter if PigsFlyingLimit was defined ahead of time and that was part of the Do While .. you wouldn't need the test inside the loop Do While iPigs > 0 and iPigs <> iPigsFlyingLimit iPigs = iPigs - 1 Loop [Edited by Jim Dean on 6/23/2018 7:59 PM] |