To make a UDF available to all workbooks you have to store it in a special
file called Personal.xls.
Personal.xls is a hidden file that opens wth Excel.
If you do not already have a Personal.xls file then you'll have to create
it.
Start Excel
It opens with the default file name of Book1
Hit ALT F11, this will open the
VB editor
Hit CTRL R, this will open the project explorer pane on the left side of the
window
Look for VBAProject(Book1) in the explorer pane
Select it, then right click
Select InsertModule
Paste your UDF code in the window that opens on the right
Hit ALT Q to return to Excel
Now, save the file and name it Personal.xls. You have to save the file to a
special directory named XLStart. I'm using Windows XP with Excel 2002. The
path to my XLStart directory is:
C:\Documents and Settings\User\Application Data\Microsoft\Excel\XLStart
Yours may be different but you need to find the XLStart directory and save
the file to that location.
Then, when you want to use the UDF in any workbook you call it like this:
=Personal.xls!your_function_name(...)
For example, suppose the function name is FindAll:
=Personal.xls!FindAll(...)
You have to replace the "..." with any arguments your function may take.
--
Biff
Microsoft Excel MVP
"yshridhar" wrote in message
...
I have an User Defined Function sent by EXCEL group. Where shall i place
this to use it as a normal worksheet function in any excel file i open. eg
like SUM, AVERAGE?
Thanks
Sridhar