ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   UDF not recognized after conversion to 2007 (https://www.excelbanter.com/excel-programming/394834-udf-not-recognized-after-conversion-2007-a.html)

ppsa

UDF not recognized after conversion to 2007
 
A UDF that was working fine in Excel 2003 is returning a #NAME? error in
2007. The function is called from a cell. There is nothing else in the cell
but a call to this function. Everything on the call line evaluates correctly
except the name of the function, or the function itself, which evaluates to
the #NAME? error. I've checked the VB side and the function is declared
public in a module.

Not sure what's holding 2007 back from running this function. Has anyone
experienced this before?

Thanks.

JLatham

UDF not recognized after conversion to 2007
 
Can we see the UDF code and an example of a presumably valid call to it?

"ppsa" wrote:

A UDF that was working fine in Excel 2003 is returning a #NAME? error in
2007. The function is called from a cell. There is nothing else in the cell
but a call to this function. Everything on the call line evaluates correctly
except the name of the function, or the function itself, which evaluates to
the #NAME? error. I've checked the VB side and the function is declared
public in a module.

Not sure what's holding 2007 back from running this function. Has anyone
experienced this before?

Thanks.


Dave Peterson

UDF not recognized after conversion to 2007
 
Did you enable macros when you opened the workbook that contains the UDF?

If you select the cell and hit F2, then enter, does it evaluate correctly?



ppsa wrote:

A UDF that was working fine in Excel 2003 is returning a #NAME? error in
2007. The function is called from a cell. There is nothing else in the cell
but a call to this function. Everything on the call line evaluates correctly
except the name of the function, or the function itself, which evaluates to
the #NAME? error. I've checked the VB side and the function is declared
public in a module.

Not sure what's holding 2007 back from running this function. Has anyone
experienced this before?

Thanks.


--

Dave Peterson

ppsa

UDF not recognized after conversion to 2007
 
Bingo! Thank you! They were disabled. Funny thing, though, is that when I
opened another workbook that contained macros, I got the usual message I used
to see in 2003 asking me if I wanted to enable macros. On this one (the one
in question in this thread) I got no such message. Also, when I went to the
macro settings in the Trust Center, I no longer see an option in 2007 to be
prompted if macros exist. There are several options to disable macros and the
only one that seems to allow macros is the most dangerous one: enable macros.

If you have any insights on these comments, I'd be interested in hearing
them; otherwise, thank you very much for this help!

"Dave Peterson" wrote:

Did you enable macros when you opened the workbook that contains the UDF?

If you select the cell and hit F2, then enter, does it evaluate correctly?



ppsa wrote:

A UDF that was working fine in Excel 2003 is returning a #NAME? error in
2007. The function is called from a cell. There is nothing else in the cell
but a call to this function. Everything on the call line evaluates correctly
except the name of the function, or the function itself, which evaluates to
the #NAME? error. I've checked the VB side and the function is declared
public in a module.

Not sure what's holding 2007 back from running this function. Has anyone
experienced this before?

Thanks.


--

Dave Peterson


Dave Peterson

UDF not recognized after conversion to 2007
 
I don't use xl2007 much, but if I open a workbook that contains code, there's a
message/prompt at the top of the worksheet window asking me if I want to enable
macros.

ppsa wrote:

Bingo! Thank you! They were disabled. Funny thing, though, is that when I
opened another workbook that contained macros, I got the usual message I used
to see in 2003 asking me if I wanted to enable macros. On this one (the one
in question in this thread) I got no such message. Also, when I went to the
macro settings in the Trust Center, I no longer see an option in 2007 to be
prompted if macros exist. There are several options to disable macros and the
only one that seems to allow macros is the most dangerous one: enable macros.

If you have any insights on these comments, I'd be interested in hearing
them; otherwise, thank you very much for this help!

"Dave Peterson" wrote:

Did you enable macros when you opened the workbook that contains the UDF?

If you select the cell and hit F2, then enter, does it evaluate correctly?



ppsa wrote:

A UDF that was working fine in Excel 2003 is returning a #NAME? error in
2007. The function is called from a cell. There is nothing else in the cell
but a call to this function. Everything on the call line evaluates correctly
except the name of the function, or the function itself, which evaluates to
the #NAME? error. I've checked the VB side and the function is declared
public in a module.

Not sure what's holding 2007 back from running this function. Has anyone
experienced this before?

Thanks.


--

Dave Peterson


--

Dave Peterson

ppsa

UDF not recognized after conversion to 2007
 
Thanks for all your help.

"Dave Peterson" wrote:

I don't use xl2007 much, but if I open a workbook that contains code, there's a
message/prompt at the top of the worksheet window asking me if I want to enable
macros.

ppsa wrote:

Bingo! Thank you! They were disabled. Funny thing, though, is that when I
opened another workbook that contained macros, I got the usual message I used
to see in 2003 asking me if I wanted to enable macros. On this one (the one
in question in this thread) I got no such message. Also, when I went to the
macro settings in the Trust Center, I no longer see an option in 2007 to be
prompted if macros exist. There are several options to disable macros and the
only one that seems to allow macros is the most dangerous one: enable macros.

If you have any insights on these comments, I'd be interested in hearing
them; otherwise, thank you very much for this help!

"Dave Peterson" wrote:

Did you enable macros when you opened the workbook that contains the UDF?

If you select the cell and hit F2, then enter, does it evaluate correctly?



ppsa wrote:

A UDF that was working fine in Excel 2003 is returning a #NAME? error in
2007. The function is called from a cell. There is nothing else in the cell
but a call to this function. Everything on the call line evaluates correctly
except the name of the function, or the function itself, which evaluates to
the #NAME? error. I've checked the VB side and the function is declared
public in a module.

Not sure what's holding 2007 back from running this function. Has anyone
experienced this before?

Thanks.

--

Dave Peterson


--

Dave Peterson



All times are GMT +1. The time now is 11:27 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com