Solved

Excel 2010 User Defined Function failure

Posted on 2013-05-13
4
428 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

The Eight Noble Truths of Backup and Recovery

How can IT departments tackle the challenges of a Big Data world? This white paper provides a roadmap to success and helps companies ensure that all their data is safe and secure, no matter if it resides on-premise with physical or virtual machines or in the cloud.

Question has a verified solution.

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

Microsoft Office Picture Manager was included in Office 2003, 2007, and 2010, but not in Office 2013. Users had hopes that it would be in Office 2016/Office 365, but it is not. Fortunately, the same zero-cost technique that works to install it with …
Technology opened people to different means of presenting information, but PowerPoint remains to be above competition. Know why PPT still works today.
This Micro Tutorial will demonstrate on a Mac how to change the sort order for chart legend values and decrpyt the intimidating chart menu.
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

831 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