[x]
Posted via EE Mobile

Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again.

Question
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

6.6

How to make error #name? on UDF go away WITHOUT a dummy update?

Asked by rberke in Microsoft Visual Basic.Net

Tags: UDF Excel user defined function error #name?


I ran across some worksheets whose cells contained #name?  It was a minor problem which was easily fixed. But, I wonder if anyone has insight as to how to avoid the problem in the future.

I am reorganizing my vba projects, and moved a module from one project to another.  I recompiled and saved both projects on the server.  The projects are shared by all of my users and are automatically opened everytime a user opens Excel.

Workbooks that referenced the module's function suddenly showed #name?  for intance formulas like
=FirstNumberOrZero(a1).

Strangely enough using Control Alt F9  to recalculate did NOT fix the problem even after closing Excel and reopening it.

But, I forced a "dummy update" by using edit replace to  change all occurances of = to =.  This forced a recalculation that was more thorough than ctrl alt f9, so all of the errors went away.

So, there are several possibilites:
  #1  Excel "compiles the cell" when the cell's formula is first entered, and the compiled version points to the original addin location. Sometimes, this compile causes excel to automatically change =firstnumberorzero(a1) into  ='customfunction.xla'!firstnumberorzero(a1).
When that happens, it is easy to understand why I see the behaviour.  But, in today's example, the function did NOT have the explicit module reference.  I am not sure why, but it appears the explicit reference still existed, it just did not show in the formula.

  #2  Perhaps Excel  does not "recompile the cell" until the cell's formula is again changed.  So, the old spreadsheet was still pointing to the original addin's location?
  if #1 and #2 are correct, it would explain everything.

Of course, a dummy change is not ideal because there are about 20 workbooks that refer to the formula. It will not be hard to change and save them all, but I would prefer to avoid this.  

Does anybody have any ideas?
[+][-]10/06/09 04:38 PM, ID: 25511003Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]10/06/09 09:22 PM, ID: 25512187Accepted Solution

View this solution now by starting your 30-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

About this solution

Zone: Microsoft Visual Basic.Net
Tags: UDF Excel user defined function error #name?
Sign Up Now!
Solution Provided By: rberke
Participating Experts: 0
Solution Grade: A
 
[+][-]10/06/09 09:24 PM, ID: 25512200Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20091111-EE-VQP-89 - Hierarchy / EE_QW_3_20080625