:banghead:
As the title states, I have hit the wall. I have two class variables (both arrays) among about 10 other class variables, that are not returning any values but "" for the string or #12:00:00AM" for a date. Here are my class variables:
My Properties
And my test code:
As I said, tLet and tDate result in "" and #12:00:00AM# respectively
When I step through the code, the values for tmp.LetterArray(0) is assigned "src" and tmp.UPSDate(0) stores "12/25/2013" correctly
When i assign tLet and TDate, the same thing happens when stepping through the code. I'll use the LetterArray property to describe what happens:
Get LetterArray is called. p_LetterArray(0) does equal "src"
Let LetterArray is called. NewValue is "src" and p_LetterArray is "src" when End Property is highlighted in the debugger
Scope returns to Get LetterArray with End Property highlighted. In checking the values, LetterArray(0) = ""
Same steps happen with the same results ("12:00:00AM" vice "")
Does anyone have any ideas.
Thanks
TC
As the title states, I have hit the wall. I have two class variables (both arrays) among about 10 other class variables, that are not returning any values but "" for the string or #12:00:00AM" for a date. Here are my class variables:
Code:
'UPSData Class Module
Private p_LetterArray() As String
Private p_date() As Date
Private p_LetterArraySize As Integer
My Properties
Code:
'Properties
Public Property Get LetterArray(index As Integer) As String
LetterArray(index) = p_LetterArray(index)
End Property
Public Property Let LetterArray(index As Integer, NewValue As String)
p_LetterArray(index) = NewValue
End Property
Public Property Get UPSDate(index As Integer) As Date
UPSDate(index) = p_date(index)
End Property
Public Property Let UPSDate(index As Integer, NewValue As Date)
p_date(index) = NewValue
End Property
Public Property Get LetterArraySize() As Integer
LetterArraySize = p_LetterArraySize
End Property
Public Property Let LetterArraySize(ByVal vNewValue As Integer)
p_LetterArraySize = vNewValue
ReDim p_LetterArray(p_LetterArraySize) As String 'value of the p_LetterArraySize is dimension of the two arrays
ReDim p_date(p_LetterArraySize) As Date
And my test code:
Code:
'test code
Sub test()
Dim tmp As UPSData
Dim tLet As String
Dim tDate As Date
Set tmp = New UPSData
tmp.LetterArraySize = 0 '1 dimenional array of 1 value (zero based)
tmp.LetterArray(0) = "src"
tmp.UPSDate(0) = "12/25/2013"
tLet = tmp.LetterArray(0)
tDate = tmp.UPSDate(0)
End Sub
As I said, tLet and tDate result in "" and #12:00:00AM# respectively
When I step through the code, the values for tmp.LetterArray(0) is assigned "src" and tmp.UPSDate(0) stores "12/25/2013" correctly
When i assign tLet and TDate, the same thing happens when stepping through the code. I'll use the LetterArray property to describe what happens:
Get LetterArray is called. p_LetterArray(0) does equal "src"
Let LetterArray is called. NewValue is "src" and p_LetterArray is "src" when End Property is highlighted in the debugger
Scope returns to Get LetterArray with End Property highlighted. In checking the values, LetterArray(0) = ""
Same steps happen with the same results ("12:00:00AM" vice "")
Does anyone have any ideas.
Thanks
TC