- Local time
- Yesterday, 20:45
- Joined
- Jan 23, 2006
- Messages
- 15,393
In the past I have been able to use/reference system.collections to be able to work with Stack, Queue, ArrayList etc.
I now have a new laptop and have move my O365 account to it. In addition I have moved to Office 64 bit.
Bottom line is the previous code using System.Collections now fails -automation error???
Does anyone have experience/advice on how to restore the ability to reference System.Collections with Access vba?
Sample from previous O365 32 bit that used to work, but now errors.
Update: This is one of the sources I had for investigating System.Collections from late 2019.
I now have a new laptop and have move my O365 account to it. In addition I have moved to Office 64 bit.
Bottom line is the previous code using System.Collections now fails -automation error???
Does anyone have experience/advice on how to restore the ability to reference System.Collections with Access vba?
Sample from previous O365 32 bit that used to work, but now errors.
Code:
Sub TestQueue()
Dim obj As Object
Set obj = CreateObject("System.Collections.Queue")
obj.enqueue 4
obj.enqueue 8
obj.enqueue 12
Dim vloop As Variant
For Each vloop In obj
Debug.Print vloop
Next
Debug.Assert obj.peek = 4
Debug.Assert obj.Count = 3
Debug.Assert obj.dequeue = 4
Debug.Assert obj.Count = 2
Debug.Assert obj.peek = 8
Debug.Assert obj.dequeue = 8
Debug.Assert obj.dequeue = 12
Debug.Assert obj.Count = 0
End Sub
Update: This is one of the sources I had for investigating System.Collections from late 2019.