Where to place UDF modules for general use

H

Hershmab

I want to create UDFs that I can use in any of my applications just like
ordinary Excel worksheet functions. I have found that if I place the
module(s) in Personal.xls I have to prefix the function name by that workbook
name.

Is there somewhere else to put them so that I can use the bare function name
in any formulae?
 
P

Patrick Molloy

put them in a module in a new workbook then save as an XLA ( Excel Add-In)
save this in the default STARTUP location so that it loads whenever excel
starts.
 
H

Hershmab

Patrick,
I followed your suggestion and saved the new workbook as an XLA in
....\Documents and Settings\....\Excel\XLSTART\UDF.XLA, where it opens up
automatically just as PERSONAL.XLS does.

But the name of the UDF that I originally wrote in PERSONAL and transferred
to the new .XLA is now not recognized.

PS I am using Excel 2003 under Windows XP SP2 - if that is relevant.
 
D

Dave Peterson

What does not recognized mean?

Did you remove the code for the UDF from personal.xls?
(If you didn't, then try deleting it. Remember to save the .xls file.)

Does the formula still point at personal.xls?
(Edit|Links and point to the new addin)

If you reenter the formula, does it work ok?

If you type the formula into an empty cell in a new test workbook, does it work
ok?
 
D

Dave Peterson

If the addin is in the XLStart folder, it doesn't need to be installed. It'll
open when excel starts normally.
 
J

JP

Interesting. But the OP appears to have done that and it didn't work.
So my thought was it still has to be registered as an add-in.

--JP
 
H

Hershmab

To all the responders: thanks very much. No one answer solved the whole
problem, but the combination, supplemented by looking up a vast VBA reference
book, did the trick!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top