PROGRAMMING WITH OBJECTS
Earlier, the section “Defining the Life and Location of Variables” introduced you to the concept of variable and procedure scoping by using the Public and Private keywords. The following sections discuss how you also can create and reference your own custom properties and methods on an object. Custom properties are essentially variables for which you can write custom routines when they're assigned or retrieved. For example, the Visible property on the form functions like a variable, but when you assign a value to it, it either hides or shows the object. With VBA, you can now create your own variables that provide special behaviors.
Note
Method is essentially another term for a subroutine or function. Methods act on the ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access