Referncing Problem...

  • Thread starter Thread starter moon
  • Start date Start date
M

moon

Hi all,

I would really like the help for this problem, please!!!

In my XL macro, I am referncing another XL file to get some macros
from it. The problem is that one of these macros closes the XL file
that contains it. I could not modify this macro to prevent it from
doing that.

The problem is that I am getting an error which says that the file
could not be closed because it is being by other files (which is my
macro).

How can I solve this issue!? How can I call a macro from another file,
which closes the XL file that contains it without getting this
dependecny error!!!!

Tahnx in advance
 
I'm not sure you can stop this behavior.

Maybe you could remove the reference and whenever you wanted to call the macro
in the other workbook, open that workbook (if it's not open) and use:

application.run "'yourotherworkbookname.xls!yourothermacro"

instead of:

call yourothermacro
 
oops. I dropped an apostrophe in the previous post:

application.run "'yourotherworkbookname.xls!yourothermacro"
should be:
application.run "'yourotherworkbookname.xls'!yourothermacro"
 

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