Solved

Excel 2010 User Defined Function failure

Posted on 2013-05-13
4
418 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
ID: 39162644
What sort of error? #VALUE, #NAME?
0
 
LVL 81

Accepted Solution

by:
byundt earned 500 total points
ID: 39162769
#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 81

Expert Comment

by:byundt
ID: 39162781
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
ID: 39162987
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Deploying a Microsoft Access application in a Citrix environment is not difficult but takes a few steps. However, Citrix system people are often of little help, as they typically know next to nothing about Access. The script provided here will take …
This article will guide you to convert a grid from a picture into Excel format using Microsoft OneNote and no other 3rd party application.
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…

919 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

13 Experts available now in Live!

Get 1:1 Help Now