November 2005
Intermediate to advanced
236 pages
6h 32m
English
This appendix provides a short tutorial on some basic VBA programming structures. Clearly, this isn't designed to teach you everything, and you should be familiar with basic programming concepts, such as variables and objects, but it should give you some information to help you get through the tasks in this book.
The Dim statement is used to declare a variable and assign it to a particular type. If the variable is an object, use the Set statement to assign an object to the variable. If the variable is not an object, use the variable, an equal sign, and the value. The following code example shows how to declare a variable called xlapp and set it to a new Excel application:
Dim xlapp as Excel.Application Set xlapp = New Excel.Application
Read now
Unlock full access