Creating UDF by Class Module (Leo)?

L

Leo

Dear Experts,
I recently became interested in style of using Class Modules.
I need to know if we can use Class Modules to creat User Defined
Functions?(functions that is useable in Excel sheet like a normal worksheet
function)
if yes, please explain how, and show a simple sample.
thanks in advance.
 
B

Bob Phillips

No you cannot, not in VBA, the UDF has to be in the standard code module.

You can call a class from within the UDF, but not directly as the UDF.
 

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