Managing Lists and Tables of Data with

Understanding Arrays ■ Declaring Arrays ■ Array Upper and Lower Bounds ■ Using Arrays in VBA Procedures ■ Arrays and Looping Statements ■ Using a Two-Dimensional Array ■ Static and Dynamic Arrays ■ Array Functions ■ The Array Function ■ The IsArray Function ■ The Erase Function ■ The LBound and UBound Functions ■ Errors in Arrays ■ Parameter Arrays ■ What's Next...

In previous chapters, you worked with many VBA procedures that used variables to hold specific information about an object, property, or value. For each single value that you wanted your procedure to manipulate, you declared a variable. But what if you have a series of values? If you had to write a VBA procedure to deal with larger amounts of data, you would have to create enough variables to handle all of the data. Can you imagine the nightmare of storing in your program currency exchange rates for all the countries in the world? To create a table to hold the necessary data, you'd need at least three variables for each country: country name, currency name, and exchange rate. Fortunately, Visual Basic has a way to get around this problem. By clustering the related variables together, your VBA procedures can manage a large amount of data with ease. In this chapter, you'll learn how to manipulate lists and tables of data with arrays.

0 0

Post a comment