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

How to create a cell-sized chart?
Tiny charts, called Sparklines, were added to Excel 2010. Look for Sparklines on the Insert tab.
You would need to write the array to a worksheet.
 
Upvote 0

Forum statistics

Threads
1,226,729
Messages
6,192,696
Members
453,747
Latest member
tylerhyatt04

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