OBJECT MEMBERS

CLASS MODULE PROPERTIES

Programmer can add properties to a class in two ways:

1. By declaring them as Public variables.

2. By using Let and Get functions.

BY DECLARING THEM AS PUBLIC VARIABLES:

BY USING LET AND GET FUNCTIONS:

If class module developer wants to give the control to client applications to set or get the properties of the class, programmer uses Get and Let methods. Following is the method to set up a property with Get/Let methods in a class module.

Open the class module’s code window.

Select the Add Procedure item in the Tools box,

Select the property option button in the Type box and the Public option button in the Scope box, and click on OK to close the Add Procedure dialog box. This adds the Get/Let procedures for this property, and it’s up to programmer to customize them.

OBJECT PROPERTIES & OBJECT VARIABLES

Object Variables are the references to a class. Client application can use the function of a class module after creating an object variable of that class.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s