Calling overloaded .Net function from VBA

D

Dahab

Hi,
Anyone know how to call an overloaded function from a .Net 2 dll in VBA
(Access 2003)?
Does the overloaded functions have to be declared in a special way in the
..Net 2 dll?


Did a test and declared two functions:

public string GetName()
and
public string GetName( string ID)

Only the latter will execute!


Thanks
D.
 
C

Cindy M.

Hi Dahab,
Anyone know how to call an overloaded function from a .Net 2 dll in VBA
(Access 2003)?
Does the overloaded functions have to be declared in a special way in the
..Net 2 dll?
VBA doesn't recognize the concept of overloading. The classic VB languages
use optional parameters, instead. I think you'd need to have a separate
function name for each function, if this is C#. If it's VB.NET you may be
able to set this up with optional parameters.
Did a test and declared two functions:

public string GetName()
and
public string GetName( string ID)

Only the latter will execute!

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 17 2005)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question or
reply in the newsgroup and not by e-mail :)
 
D

Dahab

Thanks Cindy.

D.
Cindy M. said:
Hi Dahab,

VBA doesn't recognize the concept of overloading. The classic VB languages
use optional parameters, instead. I think you'd need to have a separate
function name for each function, if this is C#. If it's VB.NET you may be
able to set this up with optional parameters.


Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 17 2005)


This reply is posted in the Newsgroup; please post any follow question or
reply in the newsgroup and not by e-mail :)
 

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