To convert a workbook containing the user-defined functions that you want to be able to enter into worksheets without their filenames, follow these steps: This action opens the Visual Basic Editor window with the workbook file containing the user-defined functions selected in the Project Explorer window.
Now you want to set up protection for this workbook so that no one but you can modify its contents.
In the Excel VBA object model, each user action that can have code associated with it is called an If you search the Excel Developer Reference for "event," you can view all the topics that describe the events that have associated VBA event-handler code.
Note: When you set the macro security level in Excel to Disable all macros without notification, Excel will run only those macros that are digitally signed or stored in a trusted location, such as the Excel startup folder on your computer.(This information then appears in the Add-Ins dialog box whenever you select the add-in file.) Excel opens the Save As dialog box, where you need to change the file type to Excel Add-In (*.xlam) and then specify the filename (to which Excel automatically appends the filename extension) under which to save it.Click the File Name combo box and make any necessary changes to the filename (without changing the filename extension) before you click the Save button.Putting a check mark in this check box prevents other users from viewing the custom functions so that they can’t make any changes to them.Next, you add a password that prevents them from removing the view protection status. Before saving the workbook as an add-in, you should add a title for the user-defined functions that it contains.