473,386 Members | 1,766 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Disable Excel warning “’Filename’ is already open. Reopening will cause..."

newnewbie
Hi,
How do I disable the warning Excel gives me when I am trying to open a document with the same name? I do not care is the changes are discarded, just need to switch the warning off and let the users reopen the file (equivalent of “Yes” on the warning box).

Please guide me in the right direction.

Thanks!
Lena
Apr 24 '09 #1
8 17802
NeoPa
32,556 Expert Mod 16PB
Are you doing this via code Lena, or is this a query about setting options in Excel generally?
Apr 24 '09 #2
It's a generic/default Excel warning and I guess I have a number of ways to go about it, I just do not know which way is better.

I have number of financial spreadsheets all bundled up in a reporting suite in OutlookSoft (SAP BPC 7.0):
Menu with options/links to (e.g.) Fin. Scorecard, P&L, Actual vs Budget.xls files. When users click on one of these options, e.g. Scorecard, the Scorecard opens. There is a button there that "takes" the user back to the Menu file by opening another Menu (so it is not a link to the Menu file, it's a formula that opens a new Menu file). However, if the Menu file is already open, this warning pops up, naturally. Since each of the original files are actually templates, I do not care if the user opens another file, the users do not need to save changes anyway.

So I my options are:

1. Put the code in each of the files(Scorecard, Act vs Budget, etc) that opens the new Menu file each time ignoring the open Menu and switches the warnings off.
2. Disable the warning in all Excel altogether.

I think I can do the #1, but I have never dealt with built in warnings.
Apr 24 '09 #3
NeoPa
32,556 Expert Mod 16PB
Strange.

When I tried, I was unable to duplicate the behaviour (Excel 2003). Even if I made changes, opening the same file would simply select the version already open and amended.

Nor was I able to see any options that would allow one to disable this behaviour.

Later on, I tried by opening the file explicitly (before I'd used the recently opened file list from the file menu), when I was able to see the error.

If you are doing this in code then there are various methods to fool the app into not popping up the warning. I'm fairly confident this cannot be done generically though (nor would I recommend it if it could to be honest).
Apr 24 '09 #4
I found some code here http://support.microsoft.com/kb/209189 that looks at the file to see if it is open or not. I modified it a bit to see if the file is open, if not, open a new one, if yes, switch to the open version. Will test it on the reporting suite on Monday.

I am in Excel 2007 complicated by the CubeAnalysis add in and SAP BPC 7.0 (former OutlookSoft). The formula that "takes back" the user to the Menu is outlook soft formula that references the application, outlooksoft navigation menu and displayed message 'Back to the Menu". It would be hard to recreate the same behavior. Also, it is only recently that we switched to Excel 07. When we had Excel 03 we did not have the problem. I do not know how to compare the two versions (I have two machines with the old Excel 03 and Sap BPC 05 and new Excel 07 and BPC 07 so I could compare if I knew how). I looked at general Excel options and they look the same. I looked behind the scenes - whatever little VBA we have there is the same in both versions. There is an add in Project there Ex4excel.xla (if I remember correctly now) that's password protected. Not sure what it does or how to get in.

I think my little solution will work on Monday. I will replace the outlook formula in all templates with the macro to see if the Menu is already open, if not, open a new one, if yes, refer to the open one.

As always, your questions help me think in the right direction. Thank you!
Apr 25 '09 #5
NeoPa
32,556 Expert Mod 16PB
@newnewbie
No worries.

It seems like NewNewbie isn't such a newb at all from reading what you did to resolve your problem. A pleasure working with you.
Apr 25 '09 #6
Thank you, that's so nice to hear. I am still so green though. I am not good at writing my own code at all. What I am getting fairly good at is plagiarizing and tweaking :) And sometimes I am stumped by a simplest thing. I never had any formal VBA, Access or Excel training. I am hoping my company will finally send me to a basic VBA course to patch so many holes in my skills.
Apr 27 '09 #7
NeoPa
32,556 Expert Mod 16PB
Plagiarizing and tweaking are good Lena :)

Sometimes courses can be helpful that's true. They can answer questions you've had outstanding for ages, and even some questions you didn't know you needed to ask. Remember though, that none of the time you're struggling is wasted. It's all learning and you're progressing as you struggle.
Apr 27 '09 #8
FishVal
2,653 Expert 2GB
Just a thought.

If excel workbook is set to be shared (via MainMenu -> Tools -> Share Workbook ...), then it could be opened by multiple users without any notifications.
Apr 27 '09 #9

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: trellow | last post by:
Hello, I am writing an application that needs to read a file that is already open by another process for writing. When I do the following: FileStream fs = new FileStream(fileName,...
2
by: Andrew Backer | last post by:
I have a series of class variables that are assigned to through reflection. Every time I compile one of these classes I get this warning : warning CS0649: Field 'xxx' is never assigned to, and...
4
by: Leeor Chernov | last post by:
Hi , I Used the object Excell Application(COM INTEROP) and it is staying as an open process, And the owner(User Name) is ASPNET Altough I try to release it with :...
0
by: Syvman | last post by:
Is there a parameter to set to allow opening Excel file read only while it is already open by another user? I've tried the .mode setting in my connection string to adModeRead, but it still won't...
0
by: Suman | last post by:
Hi All,    I am trying out a web based chat-server program on a server machine. I opened few PORTS during my trial runs and somehow the telnet session got crashed and I couldn't...
0
by: SteveM | last post by:
I have a hyperlink field in a form. The links map to documents on a local drive. When I attempt to open the doc via a link I get a MS Access waring message about hyperlinks that I have to click...
0
by: balu435 | last post by:
Hi I used the following code to enter values to an already open browser using VBA. Dim IeBrow As InternetExplorer Dim IeDoc As Object Set IeBrow = New InternetExplorer IeBrow.Visible = True ...
2
by: Kimmo Laine | last post by:
Hi! Is there a way to check if file is already open/used by another process? I know that i can do something like this to check it try { StreamWriter sw = new StreamWriter(filename);...
0
by: hidara | last post by:
Hello there. I'm trying to write a program that will insert data into an excel sheet every time it is excecuted. This file is stored on a network drive. How can VB.net check if the file is open by...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.