Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium


How do I get Excel to never reopen?

Posted on 2011-04-28
Medium Priority
Last Modified: 2012-08-13
Currently I access my spreadsheet as an ODBC data source. Occasionally I get the following message

... Is already open. Reopening will cause any changes you made to be discarded. Do you want to reopen ...

Is there some way to turn this message off and automatically choose no?
Question by:wordswithfriends
  • 4
  • 3
LVL 29

Expert Comment

ID: 35486822
I access my spreadsheet as an ODBC data source

How? Is this with VBA or some other way?

Author Comment

ID: 35488474
using java
LVL 29

Accepted Solution

leonstryker earned 2000 total points
ID: 35488986
Excel has a method to suppress these messages:

Application.DisplayAlerts = False

Can you invoke that?
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!


Author Comment

ID: 35489586
How do I invoke that function? Also when it suppresses the prompts does it choose the yes or no option by default?
LVL 29

Expert Comment

ID: 35491417
I am not a Java expert, but could you post a piece of your code where you are accessing Excel.

Also when it suppresses the prompts does it choose the yes or no option by default?

No, it prevents those messages from being raised (It is kind of a 'Yes' option in effect.)
LVL 29

Expert Comment

ID: 35699712
The above method would not be applicable with the code you are using.

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Some code to ensure data integrity when using macros within Excel. Also included code that helps secure your data within an Excel workbook.
How to get Spreadsheet Compare 2016 working with the 64 bit version of Office 2016
The viewer will learn how to create two correlated normally distributed random variables in Excel, use a normal distribution to simulate the return on different levels of investment in each of the two funds over a period of ten years, and, create a …
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

577 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question