Strange behavior

F

Fredrik Wahlgren

Hi

Inspired by the add-in project found at
http://www.codeproject.com/dotnet/excelnetauto.asp, I decided to make
something different. Unfortunately, I got the #VALUE error whenever I
entered my function. I then noticed that the function would work as expected
ONLY if all parameters had been entered. So the problem is

1) =Test("A","B","C") -> "A" This is OK
2) =Test("A","B") -> #VALUE This is not OK, I still expect "A" to
be returned

How can I fix this? The code is below.

TIA,
Fredrik
public String Test(string s1, string s2, string s3)

{

String retval;

retval = sPer;

return retval;

}
 

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