Since this property (not a method), you should use the =following values to apply:
Dim stud1 As New Student
stud1.setName = "Andy
BTW, for simplicity you can use the same name for properties getand set:
Public Property Let Name(name As String)
name_ = name
End Property
Public Property Get Name() As String
Name = name_
End Property
and then use them as follows:
Dim stud1 As New Student
'set name
stud1.Name = "Andy"
'get name
MsgBox stud1.Name
source
share