Link to home
Get AccessLog in
Avatar of Roar Gaulen
Roar Gaulen

asked on

Excel documents won't close

Silly and simple but extremely annoying problem: I'm using a macro activated excel workbook, and this doc is open on my laptop most of the day. Problem is when this doc is open I'm not able to close other open Excel files. The only way to close a excel doc is to close the macro activated excel doc first. Another issue (not that annoying); when opening a new excel doc it opens ok but doesn't always pop up on the screen, have to ALT+TAB to the newly opened doc.

I've tried repairing Office 2013, and tried uninstalling/reinstalling with no luck. The doc is in xls-format (compatibility mode). Even tried creating a new macro activated doc/xlsm-format, same problem. Also tried experimenting with DDE settings (turning on "ignore other programs using DDE") with no luck. Opened the same docs on another laptop, works fine, so problem is local.

Using Office 2013, all updates installed. OS: Win10 Pro (had same issue using Win 8.1).

Any ideas how to solve this?
Avatar of Professor J
Professor J

please see my answer to similar question that was accepted.

I would say the script is causing the whole issue that means that script ending code does not actually quit the application.

it would be difficult to identify the problem without seeing the script.

perhaps the script is using the below method

Dim ExcelApp As Object
Set ExcelApp = CreateObject("Excel.Application")

Open in new window


which at the end of the code after  Workbook.Close SaveChanges:=False you need to put back
        Set ExcelApp = Nothing

Open in new window


in order to quit the application.

so unless the script is fixed, now matter how many time you freshly install Microsoft, the script will spoil the open instance of Excel
Avatar of Roar Gaulen


Thanks for your reply. The problem isn't in the code. To verify I closed all open workbooks, created a new empty one (xlsx), opened Visual Basic editing windows and just hit Save (with no code at all), then closed the document and reopened it. The new test document has the same issues as the original one, when open I can't close other  open excel docs.
Avatar of Roar Gaulen
Roar Gaulen

Link to home
This content is only available to members.
To access this content, you must be a member of Experts Exchange.
Get Access
This question has been classified as abandoned and is closed as part of the Cleanup Program. See the recommendation for more details.