+ Reply to Thread
Results 1 to 9 of 9

Making VBA function available to any workbook

  1. #1
    Registered User
    Join Date
    12-20-2005
    Posts
    69

    Making VBA function available to any workbook

    Hi, I have just written a basic function which scans a selected range of cells to see how many times a particular string appears. Is there any way that I can make this function available to all instances of Excel on my computer, as opposed to the one workbook it's written in? (ie. without having to copy the function code into every workbook)

  2. #2
    Forum Contributor SOS's Avatar
    Join Date
    01-26-2004
    Location
    Glasgow, Scotland
    MS-Off Ver
    Excel 2003
    Posts
    327
    Hi krabople,

    If you save the function to a module in Personal.xls then it is available to every instance of Excel
    Hope this helps

    Seamus

  3. #3
    Registered User
    Join Date
    12-20-2005
    Posts
    69
    Hi Seamus, thanks very much for the help - whereabouts will I find Personal.xls? (I've tried searching my C drive for it but couldn't find it)

  4. #4
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898
    See here:

    http://www.rondebruin.nl/personal.htm

    P.S. Please read our forum rules... your title was not satisfactory... I changed it this time, but next time you may receive an infraction.
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  5. #5
    Registered User
    Join Date
    12-20-2005
    Posts
    69
    That's great, thanks very much to both of you for your help.

    Sorry about the thread title, I'll make sure I'm more descriptive in future.

  6. #6
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200
    You might not have a PERSONAL.xls, if not try recording a macro and in the "store macro in" drop down select PERSONAL.xls.

    An alternative would be to create an excel addin.
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  7. #7
    Registered User
    Join Date
    12-20-2005
    Posts
    69
    Do you have any good sources of information regarding creating addins?

  8. #8
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    _________________________________________


    Credo Elvem ipsum etian vivere
    _________________________________________
    A message for cross posters

    Please remember to wrap code.

    Forum Rules

    Please add to your signature if you found this link helpful. Excel links !!!

  9. #9
    Registered User
    Join Date
    12-20-2005
    Posts
    69
    They look perfect, thanks Noob

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 3
    Last Post: 07-12-2014, 06:04 AM
  2. Macro moves out of Active WorkBook. Why?
    By ulfah in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-19-2008, 01:14 PM
  3. Replies: 3
    Last Post: 11-10-2007, 03:45 PM
  4. How to write Formula
    By cefpe in forum Excel General
    Replies: 7
    Last Post: 09-23-2007, 04:05 PM
  5. linking to open workbook
    By Mile029 in forum Excel General
    Replies: 1
    Last Post: 05-15-2007, 06:46 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1