Accessing a Function

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I keep an XLStart file "wjm.Library.XLS" that opens automatically and
which I use to store macros I use in various programs. Simple Excel
extensions I've created and use.

Today I had a problem I wasn't clever enough to fix with a macro so I
created a simple function with VBA in my library file. It works and
tests ok from the library worksheet so now I'm ready to use it.

For some reason, my real worksheet cannot find the function I created.
Both worksheets are open, my library and my real work. It can find the
macros I use, but not the new function. When I use it from my work
file, I get the error #NAME? back.

Is there something I need to do to tell the worksheet to look in the
default library file to find this?

Thanks...

Bill
 
Hi
you have to include the filename as well. so something like
=wjm.Library.XLS!your_function_name
 
Frank said:
Hi
you have to include the filename as well. so something like
=wjm.Library.XLS!your_function_name

Grumble, grumble.... That kind of eliminates a lot of the advantage of
keeping one common default library file I guess -- if it doesn't default
to it like the macros do.

Thanks.

Bill
 
Hi
put your function in an *.xla addin and you should be able to use it
directly in your worksheet
 
Frank said:
Hi
put your function in an *.xla addin and you should be able to use it
directly in your worksheet

That does the trick! Thanks.

Bill
 

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

Back
Top