ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   user defined function (https://www.excelbanter.com/excel-worksheet-functions/168056-user-defined-function.html)

Pete_T

user defined function
 
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

Gord Dibben

user defined 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 FileSave AsFile
TypeAdd-in(*.xla)

Load through ToolsAdd-ins


Gord Dibben MS Excel MVP


On Fri, 30 Nov 2007 16:52:00 -0800, Pete_T
wrote:

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




All times are GMT +1. The time now is 10:55 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com