Error? Message

  • Thread starter Thread starter Sam Fowler
  • Start date Start date
S

Sam Fowler

Hi:

I have recently started receiving the following message
when exiting excel. (After saving the workbook).

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

The message only appears when a certain spreadsheet is
open and excel does close. Can anyone tell me how to get
this message cleared up and/or what is causing it?

Thanks,

Sam
 
You can "tie" workbooks together so that when one opens, it opens the other one
automatically.

If you try to close one that has ties back to a workbook that's still open, then
excel yells.

Next time you get the error, try this:

Hit Alt-F11 to get to the VBE.
Hit ctrl-R to see the project explorer (like windows explorer)

You should see a list of project/workbooks on the left hand side.
You'll see things like VBAProject (book1.xls)

Make a note of the workbook's project name that can't close. You're going to
look for it next.

One at a time,
click on it to select it
Tools|Referneces (from the menubar)

If you see a checkmark in front of something like:
MyWorkbookProject (or whatever your project was named)

This is the "Controlling" workbook. Your workbook can't be closed until that
workbook is closed.

So close that "controlling" workbook first.

If you're positive that you don't need the reference, you could uncheck it. But
be careful. If you didn't develop the workbook, talk to the developer first.
(There could be code that does require that workbook to be open.)




This workbook
 
Thanks dave:

That did work. I found a reference to an addin. Don't
Remember setting it, but I am very new to VBA and I may
have.

Thanks again.

Sam
 
Back
Top