Visual Basic Concepts
What You Need to Know About Objects in Visual Basic
Visual Basic makes using objects easy, but more importantly it makes possible a gradual transition between procedural coding and programming with objects.
Of course, it helps that you've been using objects for as long as you've been using Visual Basic. The following topics will extend your understanding of Visual Basic objects and introduce some new capabilities you can take advantage of.
The One-Minute Terminologist Visual Basic object terminology in a nutshell. A road map to keep handy as you explore objects.
Discovering the Class an Object Belongs To You can use the TypeOf keyword or the TypeName function to find out the class of an object.
Calling a Property or Method Using a String Name The CallByName function allows you to call the properties and methods of an object at run time.
Performing Multiple Actions on an Object Save typing by using the With statement to set multiple properties of an object.
Using Default Properties Default properties allow you to access the most important property of an object without coding the property name, but you have to be careful when using Variants.
Creating Arrays of Objects You can store object references in arrays, just as you can store other data types.
Creating Collections of Objects Collections often provide a more convenient way to keep a changing number of object references.
The Visual Basic Collection Object Explains the features of the generic Collection object and its properties and methods.
Collections in Visual Basic Visual Basic provides many built-in collections, in addition to the Collection object. They all have their idiosyncrasies.