Home » excel » excel vba – VBA code import

excel vba – VBA code import

Posted by: admin April 23, 2020 Leave a comment

Questions:

I have a VBA project I am doing in excel. I will have many workbooks that will use the same code and I do not want to have to copy the code to all the workbooks if I make a change. Is there anyway to have the code in one central place and then have all the workbooks access that code?

How to&Answers:

Yes, you have two options

1) Copy and paste the code in the Personal workbook.

More details here

Topic: Deploy your Excel macros from a central file

Link: http://office.microsoft.com/en-us/excel-help/deploy-your-excel-macros-from-a-central-file-HA001087296.aspx

2) Create an Add-In

Mode details here

Topic: Creating An XLA Add-In For Excel

Link: http://www.cpearson.com/excel/createaddin.aspx

Note: You can create Add-In in VBA as well as Visual Studio. For COM Add-Ins (created using Visual Studio), please refer to this link.

Topic: Office Development with Visual Studio (VSTO)

Link: http://msdn.microsoft.com/en-us/office/hh133430

HTH

Sid