Solved

Excel 2010 User Defined Function failure

Posted on 2013-05-13
4
407 Views
Last Modified: 2013-05-13
I have a client with an error in one of their spreadsheets related to some User Defined functions created in VBA.  They have the very same UDF working properly in other spreadsheets but when they copy and paste that same function into a particular sheet, they get errors.  We have worked through the Trust center settings to ensure macros are enabled.  The sheet they are putting this in is an existing engineering sheet that they have developed over the years.  Is there a setting somewhere within that sheet that would cause this failure?
0
Comment
Question by:geoffdavis
  • 2
4 Comments
 
LVL 39

Expert Comment

by:nutsch
Comment Utility
What sort of error? #VALUE, #NAME?
0
 
LVL 80

Accepted Solution

by:
byundt earned 500 total points
Comment Utility
#NAME? error value would indicate the UDF was installed in the code pane for a worksheet or ThisWorkbook. The UDF needs to be installed in a regular module sheet.

If the UDF still isn't working, try closing the workbook and then reopening it. If macros weren't originally enabled when you were doing your initial testing, that may be why the UDF failed. By reopening the workbook, you get a new chance to enable macros.
0
 
LVL 80

Expert Comment

by:byundt
Comment Utility
Another possibility is that this particular workbook already has a UDF by that name, but the calling parameters are different. If so, you might get #VALUE! or #NUM! error values.

If you still can't figure it out, could you please post a workbook that demonstrates the problem?
0
 

Author Closing Comment

by:geoffdavis
Comment Utility
It was a #NAME? error and it was in fact in the worksheet.  Moving it to the module fixed the problem.  Thank you both for your replies!
0

Featured Post

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

The new Microsoft OS looks great, is easier than ever to upgrade to, it is even free.  So what's the catch?  If you don't change the privacy settings, Microsoft will, in accordance with the (EULA) you clicked okay to without reading, collect all the…
PaperPort has a feature called the "Send To Bar". It provides a convenient, drag-and-drop interface for using other installed software, such as Microsoft Office. However, this article shows that the latest Office 2016 apps (installed with an Office …
The viewer will learn how to create a normally distributed random variable in Excel, use a normal distribution to simulate the return on an investment over a period of years, Create a Monte Carlo simulation using a normal random variable, and calcul…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

7 Experts available now in Live!

Get 1:1 Help Now