PanzerRanger
New Member
- Joined
- Jan 3, 2018
- Messages
- 20
Im Trying to learn how to use classes. The first one works like as charm but the second one is a real pain and I cant figure ot the issue. For som reason it works if I remove the technican1 get property. But I need to write and read from the class.
It returns :
Definition of the propertyprocedure for the same property is inconsistant, or the propertyprocedure has a variant parameter, paramarry or a invalid set final parameter
The class looks as follows:
Private pTechnican1 As String
Public Property Let Technican1(val As String)
pTechnican1 = val
End Property
Public Property Get Technican1()
Technican1 = pTechnican1
End Property
Public Property Let PlanResource(val As Boolean)
If val = True Then
Call AsignValues
End If
End Property
Private Sub AsignValues()
Technican1 = Tryout_class.tech
End Sub
and the modul accessing it
Public tech As String
Sub test()
Dim PP As Projectplaning
Set PP = New Projectplaning
tech = "Martin"
PP.PlanResource = True
End Sub
It returns :
Definition of the propertyprocedure for the same property is inconsistant, or the propertyprocedure has a variant parameter, paramarry or a invalid set final parameter
The class looks as follows:
Private pTechnican1 As String
Public Property Let Technican1(val As String)
pTechnican1 = val
End Property
Public Property Get Technican1()
Technican1 = pTechnican1
End Property
Public Property Let PlanResource(val As Boolean)
If val = True Then
Call AsignValues
End If
End Property
Private Sub AsignValues()
Technican1 = Tryout_class.tech
End Sub
and the modul accessing it
Public tech As String
Sub test()
Dim PP As Projectplaning
Set PP = New Projectplaning
tech = "Martin"
PP.PlanResource = True
End Sub
Last edited: