View Single Post
  #8   Report Post  
Posted to microsoft.public.excel.misc
Martin J.[_2_] Martin J.[_2_] is offline
external usenet poster
 
Posts: 4
Default #VALUE! error with custom excel vba function

I finally found my error, a bit silly.
I wrote a ',' instead of a ';' between the two arguments in the call of the
function. Being used to other programming languages as java or c/c++, I
obviously did not notice that difference.
Btw, thanks a lot for trying helping me,

Have a nice day,
Martin

"Dave Peterson" wrote:

You abbreviated code worked fine in my tests.

I don't have another guess.

Martin J. wrote:

I don't have any other UDF atm.

"Dave Peterson" wrote:

Do you have any unhandled errors in any other UDF?



Martin J. wrote:

Thanks for the advice.
This is what I thought as well, but even if I set the inside of the function
to this only line:
GetSmokePower = 3
I get the same error...

Any idea?

Thanks by advance,
Martin

"Dave Peterson" wrote:

I'd guess that there was something wrong in the code you didn't share.

Martin J. wrote:

Hi everybody,

I get a #VALUE! error when using a custom function. Here is the code of the
function (in a VBA module):

Function GetSmokePower(PlantType As Integer, FuelType As Integer)
...
...
GetSmokePower = Vswe
End Function

I just call this function that way in excel:
=GetSmokePower(3,1)

Did I do something wrong? Do I have to set some options on or off?

Thanks a lot for helping me,
Regards,

Martin J.

--

Dave Peterson


--

Dave Peterson


--

Dave Peterson