magelan
09-20-2012, 02:42 PM
Hi there.. Desperate coder here.
How in the heck do i just retrieve my variables that have been stored in a class? Why is this so frustrating to do?
Dim dinger As Variant
For c = 1 To 5
For r = 1 To UBound(entryList)
For Each dinger In entryList()
-> ERROR ActiveCell.value = dinger.day
with error 91 object variable or with block variable not set.
Here is the class code
Option Explicit
Private cDay As String ' duedate
'gets and sets begin here
'Day
Public Property Get day() As String
day = cDay
End Property
Public Property Let day(value As String)
cDay = value
End Property
the Entrylist variable is as such..
Global entryList() As ClassEntry
it has been re-dimmd over the course of the code to have roughly 3000 objects in it. My sets work fine...
Set entryList(classCount) = New ClassEntry 'create a new class entry
entryList(classCount).day = dates(r) 'set the date
where dates(r) is an array holding strings.
How in the heck do i just retrieve my variables that have been stored in a class? Why is this so frustrating to do?
Dim dinger As Variant
For c = 1 To 5
For r = 1 To UBound(entryList)
For Each dinger In entryList()
-> ERROR ActiveCell.value = dinger.day
with error 91 object variable or with block variable not set.
Here is the class code
Option Explicit
Private cDay As String ' duedate
'gets and sets begin here
'Day
Public Property Get day() As String
day = cDay
End Property
Public Property Let day(value As String)
cDay = value
End Property
the Entrylist variable is as such..
Global entryList() As ClassEntry
it has been re-dimmd over the course of the code to have roughly 3000 objects in it. My sets work fine...
Set entryList(classCount) = New ClassEntry 'create a new class entry
entryList(classCount).day = dates(r) 'set the date
where dates(r) is an array holding strings.