Skip to Main Content
Computing with Excel and VBA
book

Computing with Excel and VBA

by S.I. Krishan
August 2008
Beginner to intermediate content levelBeginner to intermediate
298 pages
10h 49m
English
Jones & Bartlett Learning
Content preview from Computing with Excel and VBA
Chapter 12 More VBA Programming278
In this case, the condition will be tested at the end of the loop. The result, however, will
be the same: cells A1:D1 will be filled with 1 to 4, respectively. Suppose the statement
I = 1 is replaced with I = 5 in both of the previous code segments. In that case,
the loop in the first case with the condition testing at the beginning will not execute
at all. On the other hand, the second loop will execute once setting cell E1 equal to 1.
So when you use the Do While structure you should remain aware of where you place the
condition checking.
Do Until Looping
The Do Until looping structure bears a close resemb ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Excel Programming with VBA Starter

Excel Programming with VBA Starter

Robert F Martin
Programming Excel with VBA and .NET

Programming Excel with VBA and .NET

Jeff Webb, Steve Saunders

Publisher Resources

ISBN: 9780763756680