Files
Code
Modules: implements_test1
'Implements example
'http://www.vbaexpress.com/forum/archive/index.php/t-21358.html
'Implements basically saves one time so they don't have to copy and paste members _
from one class module to another (?)
'Written by Keith Rice
'CADSharp LLC
'www.cadsharp.com
Dim test As clsSlave
Sub main()
Set test = New clsSlave
End Sub
Class Modules: clsMaster
Public Property Get Name() As String
End Property
Public Property Let Name(val As String)
End Property
Public Property Get Age() As String
End Property
Public Property Let Age(val As String)
End Property
Class Modules: clsSlave
'Now under Declarations drop down, the properties from clsMaster are available _
remove implements and see how they disappear
'These members are Private by default, but need to be Public if they are to be _
accessed by the main module
Option Explicit
Implements clsMaster
Public Property Let clsMaster_Age(RHS As String)
End Property
Public Property Get clsMaster_Age() As String
End Property
Public Property Let clsMaster_Name(RHS As String)
End Property
Public Property Get clsMaster_Name() As String
End Property