Solved

Excel 2010 User Defined Function failure

Posted on 2013-05-13
4
445 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

Question has a verified solution.

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

My experience with Windows 10 over a one year period and suggestions for smooth operation
You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
Learn how to make your own table of contents in Microsoft Word using paragraph styles and the automatic table of contents tool. We'll be using the paragraph styles in Word’s Home toolbar to help you create a table of contents. Type out your initial …
This Micro Tutorial will demonstrate how to create pivot charts out of a data set. I also added a drop-down menu which allows to choose from different categories in the data set and the chart will automatically update.

726 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