Thread: VBA References
View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default VBA References

That is correct. You can't close a workbook that is referenced by another
workbook.

I would suggest removing the reference and closing the addin, but I don't
think the reference would actually be removed until the macro terminated.

--
Regards,
Tom Ogilvy

Tommy T wrote in message
...
I have a workbook that references an add-in. I am trying
to close the add-in when I close the workbook, but I
can't get it to work. I just get the message that "This
workbook is currently referenced by another workbook and
cannot be closed." I've tried putting the code in the
BeforeClose event, but since the workbook is technically
not closed yet, it still doesn't work.

Any Suggestions?
TT