custom functions in formula bar

A

Arasch Sajjadi

hello,

i have a problem with a custom defined function only in office xp. (excel
2002 (10.2614.3311))
in office 2000 everything works fine.

i have a resource-table as a worksheet. this table is responsible for
languages english and german.
i also implemented a function as a public function for selecting the right
resource after changing the language.

in all worksheets in my workbook i use the function in the formula bar like:
=gLoadResString("Hello")
in excel 2000 the function returns the right value for the different
languages.
in excel xp i get #value. if i select a cell, go to the formula bar and
press enter, the return value comes up.

what is wrong?

thanks a lot

arasch
 
T

Tom Ogilvy

In either version, the formula you show would not recalculate unless you
forced a full recalculation. Excel looks at the argument list to determine
if a formula needs to be recalculated and your agrument has no cell
references - therefore it never needs to be recalculated.

Perhaps you need to add

Application.Volatile
as the first line of your function.

Just a guess of course.


A test before changing might be to do Ctrl+Alt+F9 in XP and see if the the
correct value is returned. If so, and you don't already have
application.Volatile in the function, then adding this might work.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top