Hi, I just joined in the hope that somebody here could help me.
I have a user defined type called typCurrency defined (in a module) as:
Public Type typCurrency
Code As String
Description As String
Index As Integer
End Type
In a separate class I have the following code:
Private mtypCurrencyList(1000) As Variant
Friend Property Get CurrencyList(intNumber As Integer) As typCurrency
CurrencyList = mtypCurrencyList(intNumber)
End Property
Friend Property Let CurrencyList(intNumber As Integer, typList As typCurrency)
mtypCurrencyList(intNumber) = typList
End Property
Now...the problem.
When I try to assign a value to CurrencyList as follows:
CurrencyList(1).Index = 1
The code goes into the Property Get, when it should go into the Let. Why? What have I done wrong? How do I write a Property that makes use of a user defined type?
Thanks in advance,
Rayner1
I have a user defined type called typCurrency defined (in a module) as:
Public Type typCurrency
Code As String
Description As String
Index As Integer
End Type
In a separate class I have the following code:
Private mtypCurrencyList(1000) As Variant
Friend Property Get CurrencyList(intNumber As Integer) As typCurrency
CurrencyList = mtypCurrencyList(intNumber)
End Property
Friend Property Let CurrencyList(intNumber As Integer, typList As typCurrency)
mtypCurrencyList(intNumber) = typList
End Property
Now...the problem.
When I try to assign a value to CurrencyList as follows:
CurrencyList(1).Index = 1
The code goes into the Property Get, when it should go into the Let. Why? What have I done wrong? How do I write a Property that makes use of a user defined type?
Thanks in advance,
Rayner1