View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default Passing a function as a parameter

the addressof operator probably is what you want.

the description in vba help:

A unary operator that causes the address of the procedure it precedes to be
passed to an API procedure that expects a function pointer at that position
in the -- argument list.



--

Regards,

Tom Ogilvy



"Scott" wrote in message
oups.com...
Hi,

I was wondering if it is possible to pass a function as a parameter.
(If you have a link and/or an example, that would be great.)

My intention is to write a C/C++ like qsort function, where I can pass
a reference to an array and the comparison function with it returning
the sorted array.

Thanks,
Scott