user defined function

  • Thread starter Thread starter Pete_T
  • Start date Start date
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
 
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
 
Back
Top