Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Excel 2010 User Defined Function failure

Posted on 2013-05-13
4
Medium Priority
?
467 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 2000 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

Moving data to the cloud? Find out if you’re ready

Before moving to the cloud, it is important to carefully define your db needs, plan for the migration & understand prod. environment. This wp explains how to define what you need from a cloud provider, plan for the migration & what putting a cloud solution into practice entails.

Question has a verified solution.

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

This article describes how to use a set of graphical playing cards to create a Draw Poker game in Excel or VB6.
Cancel future meetings from user mailboxes in Office 365 using Remove-CalendarEvents
This Micro Tutorial demonstrates in Microsoft Excel how to consolidate your marketing data by creating an interactive charts using form controls. This creates cool drop-downs for viewers of your chart to choose from.
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…

688 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