Chapter 7. Using Array Variables

In this chapter, you'll learn how to use array variables—variables that can each store multiple values at the same time. You'll start by examining what arrays are and what you use them for. You'll then examine how to create them, populate them, and erase them. Along the way, you'll look at how to resize an array to make it contain more (or fewer) values, how to specify the scope for an array, and how to find out whether a variable is an array or a regular, single-value variable.

In this chapter you will learn to do the following:

  • Understand what arrays are and what you use them for

  • Create and use arrays

  • Redimension an array

  • Erase an array

  • Find out whether a variable is an array

  • Sort an array

  • Search an array

What Is an Array? ...

Get Mastering VBA for Microsoft® Office 2010 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.