On completion of this chapter you will know:
· The range of applications where you can use VB for Applications
· How to use VB for Applications for customising those applications
· How to create a code window
· How to create a form that will act as a user interface
The most commonly used Microsoft products are
· Word
· Excel
· Access
· PowerPoint
Each of those application have attached to it a version of VB for Applications. This is a programming language based on the standalone language Visual Basic and contains all of the programming facilities of the parent language. As well as those original features each version of VB for Applications has extra features attached to it that allows it to manipulate the features of the application to which it is attached.
To explain the above statement let us take the language that is attached to Excel. As a spreadsheet Excel deals with such items as cells, columns, rows, ranges, worksheets, workbooks etc. The VB for Applications that is attached to Excel has special features attached to it that allow it to manipulate the items that are unique to a spreadsheet. A small example of what those features are:
1. Adding/deleting rows and columns
2. Adding/deleting worksheets
3. Altering the format or values of cells
All of these actions will happen automatically under programme control.
Similarly the VB for Applications attached to Access has extra features that allow us to manipulate the contents of tables. This includes opening and closing tables, modifying data in those tables, adding new records to tables or deleting records from the same. Needless to say the VB attached to Word has special code for controlling such features as font type and size, paragraph formatting, manipulation of tables. In fact anything that you can do with Word manually, can also be done to it using programme control.
This book is divided into three parts. In the first part we concentrate on how to programme using Visual Basic. This will be done with no reference to any of the applications that it is attached to. What you learn here can be applied to all versions of VB for Applications as well as to the standard Visual Basic itself. Thus you can use either Visual Basic itself or one of the application versions of it.
Once we have mastered the programming techniques we can then look at how those technique be applied in order to manipulate Excel and Access. As those are two very different applications the programming for each will be in two separate parts.

Figure 1‑1
In this book we shall be using the Excel version of VB for Applications in order to teach programming techniques. For this reason our first task is to learn how to start up Visual Basic from within Excel. This is in fact very simple. We simply open up an Excel workbook and then use Alt+F11. This will bring up a window as shown in Figure 1‑1 above. This is the window that you will be using for writing your programming code.
Using Alt+F11 in either Word or Access will also bring up and identical code window in the same applications.
1. What is Visual Basic for Applications?
2. What is the difference between it and standard Visual Basic?
3. What are the steps for starting up VB for Applications?
4. Name the three windows that make up the VBA programming interface.