>The problem is that I know how much parameters I can pass to my UDF and that is a fixed number.
>But someone can pass (even I can 'mistake') the more parameters that actually is necessarily.
>So, if that happens it mustn't go to my .PRG with UDF. The user of my UDF wouldn't know what to do then, so I must deal with that possible 'error' in a way that would explain user (=messagebox) what is 'error' and exit function.
Personally, I don't worry about this: if I get the error message "too many parameters" or something, I compare the number of parameters in the called function with the calling function, and make the corrections.
But if you like, of course, you can accept a few parameters more, and then show your own error message if pcount() > x.
One way or the other, the other programmer must then look where he called your function, and do the corrections.
Hilmar.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)