View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Sing Sing is offline
external usenet poster
 
Posts: 18
Default How to return a value from a function?

Thank you for your replies. You have been most helpful!!

"Sing" wrote in message
...
Dear Excel Gurus,

In C, one can do the following;

int func()
{
....
if (x == true)
return y;
....
}

How can I do the same thing in Excel VBA? I wish to return a value and

exit
without running the function to the end.

Thanks for your advice in advance.