Error message on start-up

R

Robin Clay

Greetings !

"All of a sudden", every time I fire up Excel, I get this error message:-

"This workbook is currently referenced by another workbook and cannot be
closed."

....with an "OK" button.

a) Why ?
b) How can I stop this happening ?
 
D

Dave Peterson

There is a workbook that is trying to be closed that is being used by a workbook
that is still open. (I don't understand why you're getting it when you open
excel, though.)

Maybe you have a macro that is opening and closing a workbook for some
purpose????

If you try to close all the open workbooks, can you determine which workbook is
yelling at you?

If yes, then you can
open the VBE (hit alt-f11)
Show the project explorer (hit ctrl-r)

You're going to have to check each open workbook's project to see if has a
reference to that "unable to close" workbook.

Expand each workbook's project to show all the branches.

If this workbook has a reference to the troublesome workbook, you should see a
branch labeled "References"
Under that branch, you'll see the workbook that has
Then click on Tools|References

You should see something like:
Reference to book1.xls

Now look through the project once more. Look for book1.xls (or whatever it's
named) in the project explorer.

You should see something like:
VBAProject (Book1.xls)
or
ProjectNameHere (book1.xls)
if the project has been renamed.

Now make sure that your workbook with the reference to book1.xls is still
selected.

Tools|References|uncheck that project (VBAProject or ProjectNameHere) in that
list.

Be aware that there are some very good reasons for this reference to exist. If
you didn't create either workbook--the one with the reference or the one that
uses the reference, try to find the originator and ask if this is ok.
 
R

Robin Clay

, for which, many thanks:
There is a workbook that is trying to be closed that is being used by a workbook
that is still open. (I don't understand why you're getting it when you open
excel, though.)

Nor do I - hence my posting !
Maybe you have a macro that is opening and closing a workbook for some
purpose????
No.

If you try to close all the open workbooks, can you determine which workbook is
yelling at you?

There ARE no workbooks open !

Excel is just starting.

The message appears after it runs the "Open" subroutine in an AddIn, that
has been unchanged for years.

Expand each workbook's project to show all the branches.

There ARE no open workbooks.

But thanks, anyway, for responding.
 

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