Saving VBA references between startups

happohippo

New Member
Joined
May 23, 2018
Messages
2
Hi.

I am referencing Microsoft Scripting Runtime in my VBA code because I use dictionaries. However, this reference reset after every startup. How can I retain this between startups so that I only need to activate it once? Or better yet is there a way to do this inside the code similar to "normal" programming languages? I would like my VBA project to be usable by other people and it seems cumbersome for them to require to check the reference on every startup.

My problem must have an answer somewhere but I cannot seem to find it here, on Stackoverflow or general internet. It seems like such a basic problem.
 

Excel Facts

Which Excel functions can ignore hidden rows?
The SUBTOTAL and AGGREGATE functions ignore hidden rows. AGGREGATE can also exclude error cells and more.
References are saved with the workbook, so other users of your workbook would not have to set them. If you use that with every workbook, you'd have to create a template with the reference set and use that as your default template. Or late bind your code so that you don't need the reference at all.
 
Upvote 0

Forum statistics

Threads
1,224,824
Messages
6,181,186
Members
453,020
Latest member
Mohamed Magdi Tawfiq Emam

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