user defined function

P

Pete_T

When calling a user defined function on a worksheet its not found unless I
enter the full path ex) PersonalXL.labor (X,Y,Z). How can I eliminate the
need to include the source workbook path .
Public Function labor (Month, Percentage,Heads as Integer)
Code etc........

End Function
 
G

Gord Dibben

I store macros and UDF's in an add-in rather than Personal.xls

The prefacing with the filename is then not necessary and you would just enter

=Function labor(x,y,z)

You can turn your Personal.xls into an Add-in by saving as an add-in.

If you prefer to keep Personal.xls as a workbook, open a new workbook, copy the
macros and UDF's you want to a module(s) then File>Save As>File
Type>Add-in(*.xla)

Load through Tools>Add-ins


Gord Dibben MS Excel MVP
 

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