Excel VBA: share procedures / macros with users

Hello experts,

I have multiple vba procedures which I would like to share with final users so they can re-use it when they open excel application. I was wondering what is the best way to automatically share with them those procedures. I was thinking to add all those procedures into an add-in file and then share the file however I don’t know if it is the best way.

Thank you very much for your feedback.
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

NorieAnalyst Assistant Commented:
Using an add-in is probably the best way, though you might need to rewrite some of the code to ensure it targets the correct workbook.
LD16Author Commented:
All the procedures are related to activesheet so I will not have issue with this. Experts: is it possible to share a script example that allows to automatically add procedures in excel application?
Fabrice LambertConsultingCommented:
All the procedures are related to activesheet so I will not have issue with this.
Highway to hell !!
What if the user click on another worksheet ?
What if the user click on another workbook ?

10 bucks your code will fail.
Ensure Business Longevity with As-A-Service

Using the as-a-service approach for your business model allows you to grow your revenue stream with new practice areas, without forcing you to part ways with existing clients just because they don’t fit the mold of your new service offerings.

Roy CoxGroup Finance ManagerCommented:
When writing code for an addin you cannot code a workbook name or a worksheet name when writing the code. Therefore, it is necessary to use ActiveWorkBook or ActiveSheet. You can add a check asking the user if the correct sheet is activated or  if the there is a naming convention for the sheets to use, e.g. "Timesheet April", then something like

If Left(ActiveSheet.Name, 9) = "TimeSheet" Then
''code here
Else: MsgBox "Are you sure the correct sheet is activated?"
End If

Open in new window

LD16Author Commented:
Thank you very much for your help.

the question  here is to find a way to: share procedures with other users and add those procedures in excel tool bar. Is there way to do this automatically through vba?
Fabrice LambertConsultingCommented:
Make a wokbook holding your VBA functions or an access database, and reference it.
Roy CoxGroup Finance ManagerCommented:
You need to create an Excel addin. Read this article about how to do this and post back with any questions.

Creating An Add-In From An Excel Macro.

There's an article and template to help you make your own Ribbon here

My First Addin

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
LD16Author Commented:
Roy, great links! Thank you very much for sharing!
Roy CoxGroup Finance ManagerCommented:
Pleased to help.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.