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 Programming272
Controlling the Execution Flow
VBA offers several ways of controlling the execution of a procedure. Some of these will
be discussed here.
If-Then-Else Structure
We begin our discussion of program flow control with a VBA statement structure that
will look familiar because of the IF worksheet function of Excel. This VBA structure
is known as the If-T hen structure or conditional structure. The structure uses two
keywords If and Then to enclose a condition that you specify. The structure looks as
follows:
If condition Then Statement
The VBA checks for the condition. If it is true it executes ...
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