Reputation: 851
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?
Upvotes: 3
Views: 3316
Reputation: 149277
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
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
Upvotes: 2