Visual Basic Concepts
You can give objects created from your classes default properties, like the default properties of objects provided by Visual Basic. The best candidate for default member is the one you use most often.
To set a property or method as the default
Note You can use the Object Browser to find out what the current default member of a class is. When you select the class in the Classes list, you can scroll through the members in the Members list; the default member will be marked with a small blue globe beside its icon.
Important A class can have only one default member. If a property or method is already marked as the default, you must reset its procedure ID to None before making another property or method the default. No compile errors will occur if two members are marked as default, but there is no way to predict which one Visual Basic will pick as the default.
You can also open the Procedure Attributes dialog box from the Object Browser. This is convenient when you're changing the default member of a class, because it allows you to locate the existing default member quickly.
To change a default property using the Object Browser
Note You cannot use the Procedure Attributes dialog box to change the default member of a class provided by Visual Basic.
The Procedure Attributes dialog box only allows you to select public properties and methods as the default for a class. If you make a public property or method the default for a class, and later change the declaration to Private or Friend, the property or method may continue to behave as if it were still declared Public.
To correct this problem, you must make the property or method Public again, because the Procedure Attributes dialog box will not show procedures declared Private and Friend. Once you have changed the declaration to Public, you can use the Procedure Attributes dialog to remove the Default attribute. You can then change the declaration back to Friend or Private.