tiredofit
Well-known Member
- Joined
- Apr 11, 2013
- Messages
- 1,926
- Office Version
- 365
- 2019
- Platform
- Windows
Can someone please explain why this is fast:
yet this is slow:
Thanks
Code:
Dim DIC As Object
Set DIC = CreateObject("Scripting.Dictionary")
Dim MyArray() As Variant
MyArray() = wksOutputForecast.Cells(2, 1).CurrentRegion.Resize(, 1).Value
Dim n As Long
For n = 1 To UBound(MyArray, 1)
DIC.Item(MyArray(n, 1)) = 0
Next n
yet this is slow:
Code:
DIC.Item(MyArray()(n, 1)) = 0
Thanks