1/4/2017 - 10:41 AM

VBA array

VBA array

Dim todoArray() As CTodoItem

'value of size indicates up to which index should be avail.. size 1 = arr of 2
ReDim todoArray(size)

Dim tempTodo As CTodoItem
Set tempTodo = New CTodoItem
tempTodo.prop1 = abc
tempTodo.prop2 = def

Set todoArray(1) = tempTodo

For Each jobItem In todoArray
  Activecell.Value = jobItem.prop1
Next jobItem