Making a module available to new work book.

Folks,
I created a macro and stored it in VBA Project(Personal.XLSB) under module (see below - it is not available) so for all new workbooks going forward could have this. The reason for this is only 2013 has the FormulaText() function.  In other words, a personal macro that I  can have available, if needed, in a new workbook.
getformula.png
Frank FreeseAsked:
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.

SimonCommented:
I think you'd need to save the macro in a workbook template named book.xltm in the XLSTART directory so that new workbooks are based on that template and include your function.

To check the startup folder paste this into a module and run it:
Sub showStartupFolder()
MsgBox Application.StartupPath
End Sub

Open in new window

0
Wilder1626Commented:
Hi

If this is linked to the other topic: Display a cell formula

If you create a Module and paste the below:
Option Explicit
Function GetFormula(x As Range) As String
GetFormula = x.Formula
End Function

Open in new window

If you create this module, that formula will be available all the time whenever you save it under another workbook.

Do you know how to create a function?

Press Alt+F11 to open the Visual Basic Editor, and then click Insert and select Module. see below picture. Then paste the above code.
Insert function
Then your formula will always work.
ex:
=GetFormula(A1)

Open in new window

0

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
Frank FreeseAuthor Commented:
thank you kindly
0
Cloud Class® Course: Microsoft Office 2010

This course will introduce you to the interfaces and features of Microsoft Office 2010 Word, Excel, PowerPoint, Outlook, and Access. You will learn about the features that are shared between all products in the Office suite, as well as the new features that are product specific.

Frank FreeseAuthor Commented:
Yes, I'm familiar with creating a function. Thanks for asking
0
Wilder1626Commented:
I glad i was able to help.  :-)
0
Frank FreeseAuthor Commented:
Jean_marc
Follow-up. What if I wanted the function to always be as part of a new workbook w/o recreating it? Does one have to change the template? Or is there another way to make it always available?
0
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
Microsoft Excel

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.