Edit Add-In and userined function (.xla)
Edit Add-In and userined function (.xla)
(OP)
Hi,
I have been using a .xla file in the xlstart folder for a long time (originally sourced early during my career) which contains various useful custom built functions for my area of work.
I can access the functions built in the .xla file perfectly from within Excel in my computer (under "User Defined Functions") without any problem.
I weas intending to make some small modifications to some of the functions. Embarrasingly I could not see the code for the function definitions. When I go to Visual basic editor in the wrksheet, I can see the .xla file as a VBA project, which when expanded, shows a folder "Microsoft Excel Objects" and under that a spreadsheet object "This Worksheet" - but there is no code that opens up on the editor that I expected to see for the in-built functions.
Where and how are the scripts for the functions hidden?
regards,
I have been using a .xla file in the xlstart folder for a long time (originally sourced early during my career) which contains various useful custom built functions for my area of work.
I can access the functions built in the .xla file perfectly from within Excel in my computer (under "User Defined Functions") without any problem.
I weas intending to make some small modifications to some of the functions. Embarrasingly I could not see the code for the function definitions. When I go to Visual basic editor in the wrksheet, I can see the .xla file as a VBA project, which when expanded, shows a folder "Microsoft Excel Objects" and under that a spreadsheet object "This Worksheet" - but there is no code that opens up on the editor that I expected to see for the in-built functions.
Where and how are the scripts for the functions hidden?
regards,
RE: Edit Add-In and userined function (.xla)
Is this a proprietary add-in, or was it created by a past employee? If you can look into it then it is obviously not password protected.
Try this:
Make sure no macros are running by pressing the Stop button. In the macro editor, select Tools from the menu, then select References. From the dialog box that appears, scroll down and find the name of the add-in. It will not be in alphabetical order, but fortunately for you all add-ins are usually listed very close to the top. It should be listed just as the name appears in the Project Window. Make sure the box next to the add-in is checked, then click okay. This will add all of the functions to your object browser.
Now, open the object browser. From the top drop down list box, select the name of the add-in. You should now be able to view all of the functions, subroutines, user forms, spreadsheets, class modules, etc. in that add-in. Now, right-click on the function of interest. If you are allowed to access them, the "View Definition" option will not be grayed out. Select "View Definition" if it is available and this will take you to the function code.
-Joshua
Well, You can try banging your head against the wall, but you just end up with lost-time injuries and damaged equipment. [M. Passman]