ShelleyBelly
New Member
- Joined
- Mar 2, 2011
- Messages
- 44
I'm trying to assign a Class Module known as Port to part of another Class Module , here's the code so far:
The port class module is as follows
The "route" class module has the following in it
when i run a basic test is get Runtime Error 91 - Object Variable not set.
I'm sure it's an easy fix, but i'm on the limit of my knowldege, any help would be appreactied.
Thanks in advance,
Tom
The port class module is as follows
Code:
Private pName As String
' Properties
Public Property Let Name(Value As String)
pName = Value
End Property
Public Property Get Name() As String
Name = pName
End Property
The "route" class module has the following in it
Code:
Private pDepPort As Port
'Properties
Public Property Let DepPort(Value As Port)
pDepPort = Value
End Property
Public Property Get DepPort() As Port
DepPort = pDepPort
End Property
when i run a basic test is get Runtime Error 91 - Object Variable not set.
Code:
Sub checkthis()
Dim Rte As Route: Set Rte = New Route
Dim Prt As Port: Set Prt = New Port
Prt.Name = "bonjour"
Rte.DepPort = Prt
End Sub
Thanks in advance,
Tom