excel - This workbook is currently referenced by another workbook and cannot be closed -
i getting error when closing "add-in" workbook (.xla) using workbook.close() method:
error 1004: "this workbook referenced workbook , cannot closed."
i closed every other workbook visible vba editor. "add-in" workbook open workbook, still error thisworkbook.close(). resetting project in vba editor "stop button" did not help.
why excel thinking workbook referenced workbook ? (edit: there no other workbook, closed them all. @ point there 1 workbook open, , 1 vba project appearing in vba editor)
it seems somehow reference has been leaked. there way avoid bug ?
i able replicate error when file (addin
\ workbook
) self referenced (see fig below).
suggest terminate excel, rename addin
file , open it. `addin shall closed whitout problem (see fig below).
Comments
Post a Comment