[vba]Код
Option Explicit
Private family As String
Private name As String
Private lastName As String
'Property Set SetFamily(familySet As String)
Property Let SetFamily(familySet As String)
family = familySet
End Property
'Property Set SetName(nameSet As String)
Property Let SetName(nameSet As String)
name = nameSet
End Property
'Property Set SetLastName(lastNameSet As String)
Property Let SetLastName(lastNameSet As String)
lastName = lastNameSet
End Property
Property Get getName() As String
getName = name
End Property
Property Get getFamily() As String
getFamily = family
End Property
Property Get getLastName() As String
getLastName = lastName
End Property
[/vba]
[vba]Код
Sub konkurs()
Dim abb As New Abbityrient
'abb.SetFamily ("Иванов")
'abb.SetName ("Иван")
'abb.SetLastName ("Иванович")
abb.SetFamily = "Иванов"
abb.SetName = "Иван"
abb.SetLastName = "Иванович"
Dim family, name, lastName As String
family = abb.getFamily
name = abb.getName
lastName = abb.getLastName
MsgBox family & " " & name & " " & lastName
End Sub
[/vba]