472,808 Members | 2,050 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,808 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 17696
NeoPa
32,534 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,534 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,534 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,534 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: erikbower65 | last post by:
Using CodiumAI's pr-agent is simple and powerful. Follow these steps: 1. Install CodiumAI CLI: Ensure Node.js is installed, then run 'npm install -g codiumai' in the terminal. 2. Connect to...
0
by: erikbower65 | last post by:
Here's a concise step-by-step guide for manually installing IntelliJ IDEA: 1. Download: Visit the official JetBrains website and download the IntelliJ IDEA Community or Ultimate edition based on...
0
by: kcodez | last post by:
As a H5 game development enthusiast, I recently wrote a very interesting little game - Toy Claw ((http://claw.kjeek.com/))。Here I will summarize and share the development experience here, and hope it...
0
by: Taofi | last post by:
I try to insert a new record but the error message says the number of query names and destination fields are not the same This are my field names ID, Budgeted, Actual, Status and Differences ...
0
by: Rina0 | last post by:
I am looking for a Python code to find the longest common subsequence of two strings. I found this blog post that describes the length of longest common subsequence problem and provides a solution in...
5
by: DJRhino | last post by:
Private Sub CboDrawingID_BeforeUpdate(Cancel As Integer) If = 310029923 Or 310030138 Or 310030152 Or 310030346 Or 310030348 Or _ 310030356 Or 310030359 Or 310030362 Or...
0
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
0
by: lllomh | last post by:
How does React native implement an English player?
0
by: Mushico | last post by:
How to calculate date of retirement from date of birth

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.