The Referenced project cannot be closed

C

C

I opened my file this morning and started working with one of the global
modules. I am exporting data to excel. I make a few minor changes (format
some cells in excel) and run the macro and everything is OK. Then I go to
run the macro and nothing executes. I close down excel or think I do nothing
visible on the Desktop, and go to close down project and get the following
error

The referenced project cannot be closed.

This project is currently referenced by another project and cannot be closed.

Can someone help me out here?
 
J

John

C said:
I opened my file this morning and started working with one of the global
modules. I am exporting data to excel. I make a few minor changes (format
some cells in excel) and run the macro and everything is OK. Then I go to
run the macro and nothing executes. I close down excel or think I do nothing
visible on the Desktop, and go to close down project and get the following
error

The referenced project cannot be closed.

This project is currently referenced by another project and cannot be closed.

Can someone help me out here?

C,
First you should be aware that unlike Project you can have several
instances of Excel open, and it won't always be obvious because some
instances may be open in the background. This can happen if a macro you
are executing opens a new instance of Excel. Unless your code
specifically closes Excel when it completes, (or leaves it visible so
you can manually close it), a new instance will be created if the macro
is run again.

If it appears a macro is not running, it may be due to an infinite loop
that never completes. It may not be obvious until you look at the
Windows Task Manager (Cntl-Alt-Del) and see that an application is not
responding.

One thing is a little puzzling about your post. The second sentence says
you "...run the macro and everything is OK.". Then in the next sentence
you say you try to run the macro and nothing happens. So which is it?

I suggest you step through your macro code and see where it gets hung
up. Then you should, (perhaps with our help), be able to take the
necessary action to resolve the issue.

John
Project MVP
 

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