VBA - save Array to use after close

Kamolga

Well-known Member
Joined
Jan 28, 2015
Messages
1,185
Hi,

I am a basic user of arrays. I build a 2d array "IDarr"

Code:
ReDim IDarr(1 To r, 1 To 3) As Variant          
          'Column 1 is Project task Name with unique ID
          IDarr(r, 1) = ThisProject.Name & "_" & iTask.UniqueID
          'Column 2 is Outlook Calendar ID
          IDarr(r, 2) = OtlAppointment.GlobalAppointmentID

Is there a way to declare it so that the records are saved with the file (rather than variant inside the macro) so that I can use them when when re-open the file?
 
Last edited:

Excel Facts

Create a Pivot Table on a Map
If your data has zip codes, postal codes, or city names, select the data and use Insert, 3D Map. (Found to right of chart icons).
You would need to write the array to a worksheet.
 
Upvote 0

Forum statistics

Threads
1,215,943
Messages
6,127,826
Members
449,411
Latest member
adunn_23

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top