• Simple VBA functions

    Author
    Topic
    #467358

    I’ve written a couple of simple functions that I need to use in Excel spreadsheets to transform some text into a specific format that we use. The function works well, I created a module, coded the vba, tested it and all is good.

    The next question is, how do I make this function available in the default workbook? Everytime a .xlsx (or .xls) is opened or a new workbook is created I need it to be available. An add-in seems like a lot of effort, it’s a total of three functions accross maybe 150 lines of code and will just be used on three machines. It would need to work under Excel 2007, 20003, and 2002.

    I’m looking for a really easy solution if one exists. Any help would be greatly appreciated…

    Viewing 2 reply threads
    Author
    Replies
    • #1213141

      If they are functions in your personal.xls they are available to all files and open when XL does. An addin is a good route, especially if you want to share them with others.

      If you want them physically in every workbook created, they must be added to all previously created ones (and will give the macro warning!). To have them automatically in the default workbook, create a new workbook, add the functions and save as “book.xlt” (must be this name) in the XLStart or the alternate startup folder.

      Steve

    • #1213750

      Just curious… if you did want to make it an add-in, how do you do that? and how would you share the add-in?

    • #1213768

      I created an article about creating add-ins a while ago:

      http://www.jkp-ads.com/articles/distributemacro00.asp

    Viewing 2 reply threads
    Reply To: Simple VBA functions

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: