Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
user defined functions
Dear all,
I wrote an user defined function in excel 2000 to calculate certai values pertaining to my job as purchase manager for a health programme The same VBA code works in immediate mode in the VBA editor. But it i not listed in the list of functions in the formula dialog box (eg Whe = is typed in a cell) the name of the function is not displayed in th user defined or custom category. a)What are the steps to register this function for this worksheet? b)what should I do to make it available for all other worksheets? I would appreciate anyhelp in this matter. Could it be that securit levels for macros have to be changed? Docmural -- Message posted from http://www.ExcelForum.com |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
user defined functions
The UDF must be in a standard code module, not a worksheet class, workbook
class, userform or other class module. It will be available as long as the workbook with UDF is open, but other workbooks will need to prefix it with the workbook name. A common practice is to put in in Personal.xls. Another approach is to put it in an addin, and install that. -- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct) "docmurali " wrote in message ... Dear all, I wrote an user defined function in excel 2000 to calculate certain values pertaining to my job as purchase manager for a health programme. The same VBA code works in immediate mode in the VBA editor. But it is not listed in the list of functions in the formula dialog box (eg When = is typed in a cell) the name of the function is not displayed in the user defined or custom category. a)What are the steps to register this function for this worksheet? b)what should I do to make it available for all other worksheets? I would appreciate anyhelp in this matter. Could it be that security levels for macros have to be changed? Docmurali --- Message posted from http://www.ExcelForum.com/ |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
user defined functions
Unless you make up a reference, you will need to prefix your
user defined macro even though it is in your personal.xls workbook. =personal.xls!myfunction(A2,C2) Getting Started with Macros and User Defined Functions User Defined Functions (#UDF) http://www.mvps.org/dmcritchie/excel/getstarted.htm#udf Your own User Defined Functions will appear under the "User Defined" topic near the bottom of the Paste Function (wizard) seen as Fx on the toolbar. Since you cannot easily put a description on each parameter, it would be wise to name the parameters with meanful names. Security level should be set to "Medium". A "High" security level prevents macros and your UDFs from running. If you are running your macros, you should no problem here. Tools, macro, security (tab), level set to Medium --- HTH, David McRitchie, Microsoft MVP - Excel [site changed Nov. 2001] My Excel Pages: http://www.mvps.org/dmcritchie/excel/excel.htm Search Page: http://www.mvps.org/dmcritchie/excel/search.htm "Bob Phillips" wrote ... The UDF must be in a standard code module, not a worksheet class, workbook class, userform or other class module. It will be available as long as the workbook with UDF is open, but other workbooks will need to prefix it with the workbook name. A common practice is to put in in Personal.xls. Another approach is to put it in an addin, and install that. "docmurali " wrote ... I wrote an user defined function in excel 2000 to calculate certain values pertaining to my job as purchase manager for a health programme. The same VBA code works in immediate mode in the VBA editor. But it is not listed in the list of functions in the formula dialog box (eg When = is typed in a cell) the name of the function is not displayed in the user defined or custom category. Docmurali |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
User Defined Functions | Excel Worksheet Functions | |||
User defined functions without using VBA. | New Users to Excel | |||
User Defined Functions | Excel Worksheet Functions | |||
excel functions and User defined functions | Excel Programming | |||
User Defined Functions | Excel Programming |