| Create a new project and add two class modules to the project. Name one clsProductTemplate and the other clsSoftware. Then open clsProductTemplate and add the following code: Public Property Get ProductID() As Variant End Property Public Property Let ProductID(ByVal vNewValue As Variant) End Property Public Property Get ProductName() As Variant End Property Public Property Let ProductName(ByVal vNewValue As Variant) End Property Public Property Get ProductCategory() As Variant End Property Public Property Let ProductCategory(ByVal vNewValue As Variant) End Property Now open clsSoftware and add the following like of code to the general declarations sections: Implements clsProductTemplate Now you will notice that the dropdown box above will have a new object in it called clsProductTemplate. If you select clsProductTemplate the event dropdown will now show a list of all the properties you added to clsProductTemplate. Why would you want to do this? Well one of the major reasons for using the implements keyword is to ensure a standard interface across your objects. clsSoftware implements clsProductTemplate and therefore MUST add the properties listed in clsProductTemplate |
Using the Implements Keyword |
Freelance ASP PHP web development | Web developer India Web development India| Prayagasoft - web designer India, Ecommerce developer india, Ecommerce design