Home |
Search |
Today's Posts |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
You could set the Saved property to True in the BeforeClose event, that way
Excel doesn't complain. Otherwise I think should do it: If MsgBox("Save Changes?", vbYesNo) = vbYes Then ThisWorkbook.Save Rob "Tommy Y" wrote in message ... Thanks Rob. Is there a way I can bring up the save prompt (not the saveas dialog box) before I do this? That way, I could have the user choose to save their changes, but I would then set the displayalerts property to false before I removed the reference. -----Original Message----- TT, You could do something like: With ThisWorkbook.VBProject .References.Remove .References("MyVBAProject") End With MyVBAProject.ThisWorkbook.Close Be sure not to save changes to your own workbook, else the reference is gone for good! Rob "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 . |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How to convert all 3d references to normal references in a workboo | Excel Discussion (Misc queries) | |||
How to convert all 3d references to normal references in a workboo | Excel Worksheet Functions | |||
convert relative cell references to absolute cell references via amacro? | Excel Discussion (Misc queries) | |||
Help with converting a block of cells with Absolute and mixed references to relative references | Excel Worksheet Functions | |||
How to rename references from range names to cell references | Excel Discussion (Misc queries) |