Hello guys. I have an extremely large array of String in Excel VBA and I want to dump different parts of it onto different worksheets. To make it faster, I'm of course intending to do a single-step dump, so if I call that big array "DataCache ()" I want to do something like:
Sheets (1).Range ("B2").Resize (1000000,250).Value = DataCache (2,2) ' Starting from the slot (2,2) of the array and dump onto sheet1
Sheets (2).Range ("B2").Resize (1000000,250).Value = DataCache (2000000,5) ' Similar thing from array slot (2000000,5) for sheet2
...
Is there any way to do this without having to copy the 2nd portion of the array into a new array? I was thinking maybe I can do something like this (conceptually) :
Dim SubArry () As String
....
SubArray = VarPtr ( DataCache (2000000, 5))
Sheets (2).Range ("B2").Resize (1000000,250).Value = SubArray
I'd appreciate it if anyone could help me with this. I'm using "Microsoft VBA 7.1" on Office 2021 x64.