𝔖 Scriptorium
✦   LIBER   ✦

πŸ“

An Introduction to Programming with Visual Basic for Applications

✍ Scribed by Claudio Fornaro


Publisher
CELID
Year
2006-2015
Tongue
English
Leaves
212
Edition
1 rev.2
Category
Library

⬇  Acquire This Volume

No coin nor oath required. For personal study only.

✦ Synopsis


Programming is scientific creativity supported by study of theory. It is essential
to know how a computer works and to have the bases of logics and
mathematics, but proficiency requires knowledge of the fundamental
programming algorithms and techniques developed by the scientific
community for the most classic problems. However, learning programming
starts from knowing the language syntax and using it to describe a solution of a
problem. This is the most complex obstacle, because it requires the
development of a precise and procedural reasoning.
This book was designed to be used in a course of programming basics. It is
addressed to beginners, and therefore it only covers the basic procedural
elements of the language; these, however, constitute the basis of each type of
programming. The choice to adopt Visual Basic for Applications instead of
other more powerful and β€œnoble” languages is essentially due to its lower
impact on beginners, together with its easiness in building visual interfaces.
Moreover, the required software is also easy to find and install: it is included in
every application of the Microsoft Office suite (Excel, Word, etc.). In addition,
it may be worth noting that Visual Basic is one of the most used programming
languages in the world.
Understanding this book requires no previous programming experience and no
mathematics skill other than some high school algebra notions. Many notes,
tips, and solved exercises make it suitable for self-taught students as well.

✦ Table of Contents


Preface vii
1 Introduction 1
1.1 Languages and Translators 1
1.2 The Integrated Development Environment 3
1.3 Building a Graphical Interface 5
2 A First Experiment 9
2.1 Exercises 14
3 Variables and Numerical Types 15
3.1 Numerical variables 16
3.1.1 Numerical Expressions 18
3.1.2 Evaluation of Numerical Expressions 18
3.1.3 Type Conversion Functions 21
3.1.4 Intrinsic Functions 23
3.1.5 Operators Priority and Associativity 23
3.2 Numerical Constants 24
3.3 Exercises 26
4 Keyboard Input and Screen Output 27
4.1 The MsgBox Instruction 27
4.2 The InputBox Instruction 29
4.3 Exercises 30
5 Conditional Execution 31
5.1 The If-Then Statement 31
5.2 Relational Expressions 36
5.3 Logical Expressions 37
5.3.1 The Or Operator 37
5.3.2 The And Operator 37
5.3.3 The Xor Operator 37
5.3.4 The Not Operator 38
5.4 Operators Precedence 38
5.5 The Select Case Statement 39
5.6 Exercises 42
6 Strings 45
6.1 String Variables 46
6.2 String Operators 47
6.3 String Functions 48
6.3.1 Len 48
6.3.2 Left 48
6.3.3 Right 48
6.3.4 Mid 49
6.3.5 Instr 49
6.3.6 Other String Functions 50
6.4 String Comparison 52
6.5 Exercises 54
7 Unconditional Jumps 55
8 Loop Statements 57
8.1 The For-Next Loop 58
8.2 Exercises 63
8.3 The Do-Loop Loop 64
8.4 Exercises 67
9 Arrays and Matrices 69
9.1 Matrices 71
9.2 String Arrays and Matrices 72
9.3 Exercises 73
10 Files 75
10.1 Opening a File 76
10.2 Closing a File 77
10.3 Writing to a File 78
10.4 Reading from a File 79
10.5 Exercises 83
11 Functions and Subroutines 85
11.1 Functions 88
11.2 Subroutines 89
11.3 Arguments and Formal Parameters 90
11.3.1 Arguments passage 91
11.3.2 Vector Arguments and Parameters 93
11.4 Static Variables 94
11.5 Non-local Variables 94
11.6 Variable Initialization 95
11.7 Recursion 96
11.8 Exercises 98
12 Compound Data Types 101
12.1 Exercises 103
13 Some Basic VBA Controls 105
13.1 The Label Control 105
13.2 The TextBox Control 106
13.3 The OptionButton Control 108
13.4 The CheckBox Control 109
13.5 Disabling and Hiding Controls 110
14 Good Programming Practices 111
14.1 Implicit Variables 111
14.2 Code Indentation 111
14.3 Comments 112
15 Debugging 113
16 More Complex Exercises 115
17 Solution to the Exercises 123
17.1 Chapter 2 - A First Experiment 123
17.2 Chapter 3 - Variables and Numerical Types 124
17.3 Chapter 4 - Keyboard Input and Screen 126
17.4 Chapter 5 - Conditional Execution 126
17.5 Chapter 6 - Strings 131
17.6 Chapter 8 - Loop Statements 137
17.7 Chapter 9 - Arrays and Matrices 150
17.8 Chapter 10 - Files 161
17.9 Chapter 11 - Functions and Subroutines 173
17.10 Chapter 12 - Compound Data Types 185
17.11 Chapter 16 - More Complex Exercises 187


πŸ“œ SIMILAR VOLUMES


QBASIC with an Introduction to Visual Ba
✍ David I. Schneider πŸ“‚ Library πŸ“… 1994 πŸ› Macmillan Coll Div 🌐 English

This Second Edition brings an entirely new dimension to the basic programming course--by introducing students to the use of objects and to event-driven programming in Visual Basic. Designed for use with the IBM-PC and its compatibles, the text presents the fundamentals of computer programming, such

An Introduction to Programming Using Vis
✍ David I. Schneider πŸ“‚ Library πŸ“… 2013 πŸ› Prentice Hall 🌐 English

An Introduction to Programming Using Visual Basic 2012, Ninth Edition β€”consistently praised by both students and instructors β€” is designed for readers with no prior computer programming experience. Now updated for Visual Basic 2012, Schneider focuses on teaching problem-solving skills and sustainabl

An introduction to programming using Vis
✍ David I. Schneider πŸ“‚ Library πŸ“… 2006 πŸ› Pearson/Prentice Hall 🌐 English

Based on the newest version of Microsoft's VB. NET, this revision of Schneider's best-selling text is designed for students with no prior computer programming experience. The author uses Visual Basic .NET to explore the fundamentals of programming, building a strong foundation that will give student

An Introduction to Programming Using Vis
✍ Schneider D.I. πŸ“‚ Library πŸ“… 2013 πŸ› Pearson 🌐 English

An Introduction to Programming Using Visual Basic 2012, Ninth Edition β€”consistently praised by both students and instructors β€” is designed for readers with no prior computer programming experience. Now updated for Visual Basic 2012, Schneider focuses on teaching problem-solving skills and sustainabl