Two functions of the same name in seperate xla's

C

crookie74

I am trying to find out what takes precedence if you have two
different function with the same name that live in different xla's/
xll's.

From the testing I have done, the following seems to happen

If I have a function called myfunc in myxla1.xla and another function
also called myfunc in myxla2.xla. If I then type "=myfunc" in a cell,
the function it uses will be which ever xla was loaded first.

If I have a function called myfunc in myxla1.xla and another function
also called myfunc in myxll.xll. If I then type "=myfunc" in a cell,
it always uses the function in myxll.xll, regardless of which order
the xla and xll were loaded.

Although I have done this testing, I would like some concrete proof of
what should happen in these conditions, can anyone please help?

Before anyone says, I know it is far from ideal to have two different
functions with the same name available at the same time but without
going into the detail, my company has ended up in this situation where
my company bought over another company and both have there own menus,
one being and xla and the other an xll.

Thanks in advance for any help you can give.
 
N

NOPIK

I am trying to find out what takes precedence if you have two
different function with the same name that live in different xla's/
xll's.

From the testing I have done, the following seems to happen

If I have a function called myfunc in myxla1.xla and another function
also called myfunc in myxla2.xla. If I then type "=myfunc" in a cell,
the function it uses will be which ever xla was loaded first.

If I have a function called myfunc in myxla1.xla and another function
also called myfunc in myxll.xll. If I then type "=myfunc" in a cell,
it always uses the function in myxll.xll, regardless of which order
the xla and xll were loaded.

Although I have done this testing, I would like some concrete proof of
what should happen in these conditions, can anyone please help?

Before anyone says, I know it is far from ideal to have two different
functions with the same name available at the same time but without
going into the detail, my company has ended up in this situation where
my company bought over another company and both have there own menus,
one being and xla and the other an xll.

Thanks in advance for any help you can give.

Precedence depends on what defined (allocated) first.
xll probably set as linked object (or, defined on higher level).
You can create you own library, set the link on top of the libraries
list (in VBA Editor), and get precedence over all later definitions.
 

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