Preliminaries of VBA
Ngai Hang Chan, Hoi Ying Wong · 2015
This chapter introduces the elementary programming skills in Visual Basic for Applications (VBA). VBA is a common programming language linked to Microsoft Excel and other Microsoft Office software that was developed to automatically control and perform repetitive actions. The chapter explains how to start a VBA in Microsoft Excel and give some popular algorithms for performing repetitions. It introduces the assignment operator, mathematical operators, comparative operators, and logical operators. VBA provides the Type statement to allow users to create a more complex custom data type or user-defined data types (UDTs). VBA has a variety of built-in functions that can simplify calculations and operations. One advantage of using Excel VBA is that it can link the Visual Basic editor (VBE) and worksheet so that users can read in and print out data in the worksheet and execute the programs written in VBE.