Free Microsoft Excel 2013
Quick Reference
Free Microsoft 2013 Quick Reference Guide

Free Microsoft Excel 2013 Quick Reference

Disable save changes prompt Results

Hi -

I'm using Excel 2004 on a Mac. Whenever you save a text file (tab delimited) in Excel it always prompts to ask "Do you want to save changes you made to document.txt?" Even if you have just saved the file, when you go to close the file, it will still prompt to ask if you want to save.

Basically I have a macro that copies some data, opens a new workbook, pastes the data to the new worksheet, saves it as text, then closes then repeats this over and over. But it always prompts to save changes and I just have to click Don't Save over and over.

Here is the end of the macro where it saves and closes the file.

ActiveWorkbook.SaveAs Filename:= _
"Macintosh HD:Users:User1:Desktop:Samples:"Sample.txt", FileFormat:= _xlText, CreateBackup:=False
ActiveWindow.Close

If anyone knows how to disable the prompt that automatically asks if I want to save changes for text files, I would be really grateful. Obviously I would still want it to ask, if there are changes since my last save, but if not I would like it to just close even for text files.

Anyone have any ideas? Thanks!!

I have a file that I don't want people to change at all, so there is no need for them to be prompted whether they want to save changes when closing the file. Does anyone know how to disable this? I found a few supposed solutions on various other forums, including:

Private Sub Workbook_BeforeClose(Cancel As Boolean)
    Me.Saved = True
End Sub

Sub CloseBook2()
    ActiveWorkbook.Close savechanges:=False
End Sub
However, neither of these worked for me. A debug statement in the first showed me that Excel wasn't even getting into it when I went to close the sheet. What's wrong with my syntax?

Hi everyone,

I have a workbook into which my users enter details. I want them to be able to save this workbook, with their details in it, as a new file. However, I do not want them to be able to acidentally overwrite anything of mine.

That is, I want to disable Excel's default prompt of 'would you like to save changes you made to this file'. I have written my own prompt asking if they would like to save their details, which supplies a pre-determied filename, so I'm not bothered that disabling te prompt could make people able to close without remembering to save.

Any ideas on how I do this?

The code I have for my close-down so far goes like this:


	VB:
	
) 
     
    Dim Msg, Style, Title, Response, MyString 
    Dim fileSaveName As String 
     
    If ThisWorkbook.Name = "Revised Stair Program.xls" Then 
         
        Msg = "Would you like to name these stairs?" 
        Style = vbYesNo 
        Title = "Save this file?" 
        Response = MsgBox(Msg, Style, Title) 
        If Response = vbYes Then 
            MyString = "Yes" 
            fileSaveName = Application.GetSaveAsFilename( _ 
            InitialFileName:=(ActiveWorkbook.Sheets("Main").Range("D21") & Chr(32) &
ActiveWorkbook.Sheets("Main").Range("D22") & Chr(32) & "stairs"), _ 
            fileFilter:="Excel Files (*.xls),*.xls") 
            If fileSaveName  "" Then 
                ActiveWorkbook.SaveAs fileSaveName 
            End If 
        End If 
         
    End If 
     
    Msg = "Would you like to run call-off for these stairs?" 
    Style = vbOKCancel + vbSystemModal 
    Title = "Run call-off?" 
    Response = MsgBox(Msg, Style, Title) 
    If Response = vbOK Then 
        MyString = "OK" 
        Open_Files fileSaveName 
    End If 
     
End Sub 

If you like these VB formatting tags please consider sponsoring the author in support of injured Royal Marines
Thanks in advance

I have searched all 60 posts on this issue and my book on Excel and still can't figure out what to do.

People will load my Excel program called Drivers and then perform some actions according to InputBox prompts that will change the formulas in Drivers to simple numbers (using Paste SpecialValues - I did that so I could have the macro sort properly).
I then have an imput box that will save the file automatically under a new name (Route1, Route2 etc.)

My problem is that I don't want people to be able to save Drivers over itself when they exit Excel because that will destroy the formulas.

Right now they can exit Excel using the little "x" at the top right-hand corner and then get a prompt asking if you want to save. I don't want people to have that option because they could easily make a mistake and click on "Yes" and there goes my formulas. Also, I don't want them to be able to save as Save or Save as under the File menu.

I know there must be a way to do this but I haven't got the expertise to figure it out.

So thank you in advance for any direction you could provide.

I am using Excel '97, and I'm having issues with files that were created in versions after '97. The specific problem I'm having is that I have macros that update workbooks and save changes. When saving, I'm always prompted with the error message "This file was created in a later version of Excel..." I've tried to set application.displayalerts = false, but by doing this you disable the savechanges feature. I've also tried the savecopyas command work-around; however, my macro is updating and saving hundreds of large files, and there are time constraints involved. Is there another way to disable this message (other than upgrading my version of Excel)? If not, is there a way to "reset" the file attributes so that it thinks it was created in Excel '97? Thanks in advance for any help.

I have an excel file that I would like to put on the web server.
Within this file there are links pointing to different worksheets in
this same excel file.
When I open the file through the browser and click on any of the
links, it promts me to save or discard changes, even know I didn't
make any changes. Is there any way to disable this prompt?

Thanks.

how to disable "Do you want to save the changes to " manual prompt
everytime while closing excel files having macros (macro password not known),
while in automated task mode which is closing and opening files automatically.

how to disable "Do you want to save the changes to <file name>" manual prompt
everytime while closing excel files having macros (macro password not known),
while in automated task mode which is closing and opening files automatically.

Hello -

I am trying to figure out why I cannot set the ThisWorkbook.Saved
values to True to avoid being prompted whether I want to save the
workbook upon exiting.

The code is doing the following ...

Workbook_Open()
Application.OnTime Now, "preProcess"
...

Public Sub preProcess()
If ThisWorkbook.ReadOnly Then

ThisWorkbook.Sheets("Sheet1").Shapes("Button1").ControlFormat.Enabled =
False
ThisWorkbook.Saved = True
End If
...

If I open the file in read-only and close it without making any
changes, I get the "Do you want to save changes ..." message.

All I want to do is to disable the button when the file is read-only.
How can I tell Excel that it should not care whether the button has
changed?

I use Excel 11 (2003) SP2.

Thanks!
Joe

' *.xls' should be opened as read only unless you need to save changes.
Open as read-only?
Yes No Cancel

Is there code to disable the cancel option when this prompt comes up?

OR

Can I make something else happen when cancel is selected instead of
whatever excel tells it to do? Overriding the cancel button would be
fine as well.

I am opening a workbook with a commandbutton on a form in another
workbook. I want to give users the option of opening the workbook as
readonly or not, but if the cancel button is selected, it is not
returning to the form I need it to go to. I have tried making my own
msgbox with only a yes and no button, it just seems dimming the cancel
button would more simple if I knew where to start.

Any ideas?

Thanks!

Hi

currently i have save, save as and save on exit disabled in excel as it is an induction form with personal information so i do not want anyone to be able to save that information. However the HR department occasionally needs to amend any mistake or information on that form. I was thinking of having the save etc disabled but can be renabled with the correct password so those changes can be made?

is this at all possible?

thanks

HI all, thanks for your help. I have workbook that 99% of the time I use it, print it and close it. Don't want it saved. This workbook is used by 9 other people and of course, someone saves it when they don't mean to. I need a msgbox to come up when/if they hit the "save" button on the menu bar and when/if they hit the X and prompted "do you want to save changes?" Something like a second chance to not save it - like "do you really want to save this?" I found the code to disable saves, but there are a few rare times when it does need to be saved so I can't disable all the save options. Thanks for any help.

They say it's only easy if you know the answer, but I've never come across this before...

Can anyone help me with this probably easy function!

I'm running Excel 2010, and when I click on the X button to close the application, it automatically closes without giving me a save prompt beforehand!!! I normally save prior, but sods law, on the one occasion I don't, then I've lost the changes to the workbook as it didn't prompt me to save changes prior to closing!

Can anyone help in getting this function back on? (It did work in the past, but I can't for the life of me think what I've done to disable it!)

Many thanks in advance

Kev.


	VB:
	
) 
    Me.Saved = True 
End Sub 
 
Private Sub Workbook_BeforeSave _ 
    (ByVal SaveAsUI As Boolean, Cancel As Boolean) 
    If SaveAsUI = True Then Cancel = True 
    Cancel = Not SaveAsUI 
End Sub 

If you like these VB formatting tags please consider sponsoring the author in support of injured Royal Marines
i've used the above sub procedure to disable save/save changes, but after i delete one worksheet, save as UI still prompt out.

i've "Application.CommandBars("xxx").Enabled" to disable the menubar, but i dont know how to disable the right click button to avoid user from delete the worksheet?

I have tried every possible variation I can think of to solve this. I am trying to run a macro through VBA that finds all doc/x files, opens them, exports as a PDF, and then kills the doc/x file(s). Everything works perfectly except for the automation! Every few documents has "Tracking Changes" turned on, and this prompts the user to make sure they want to save the file.

What I have tried:
- Disabling the prompt through the Trust Center
- Word.Application.DisplayAlerts = False

Since I work on a closed and classified system, I can't transfer the code in its entirety, but this is almost exactly how I approached this problem:


	VB:
	
[FONT=Courier New][SIZE=2][COLOR=black]Sub doc2pdf() 
 
Dim wordApp As Word.Application[/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2][COLOR=black] 
Dim wordDoc As Word.Document 
Set wordApp = New Word.Application 
 
On Erro Goto SomeErrorHandler[/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2][COLOR=black] 
 
[/COLOR][/SIZE][/FONT] [FONT=Courier New][SIZE=2][COLOR=black]wordApp.Visible = False 
[/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2][COLOR=black]wordApp.DisplayAlerts = False [COLOR=gray] 'Tried both False and
wdNone[/COLOR]
[/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2][COLOR=black]Set wordDoc = wordApp.Documents.Open(myFile) 
 
[/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2][COLOR=black]With wordDoc [COLOR=gray] 'Here is where it breaks down, the
prompt shows up asking if I want to save the file because it has tracked changes[/COLOR]
[/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2][COLOR=black]     .ExportAsFixedFormat OutputFileName:=
_[/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2][COLOR=black] 
[/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2][COLOR=black]            ActiveDocument.Path & "" & ActiveDocument.Name &
".pdf", ExportFormat:= _[/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2][COLOR=black] 
[/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2][COLOR=black]            wdExportFormatPDF, OpenAfterExport:=False,
OptimizeFor:= _[/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2][COLOR=black] 
[/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2][COLOR=black]            wdExportOptimizeForPrint,
Range:=wdExportAllDocument, _[/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2][COLOR=black] 
[/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2][COLOR=black]            Item:=wdExportDocumentContent,
IncludeDocProps:=False, KeepIRM:=False, _[/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2][COLOR=black] 
[/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2][COLOR=black]            CreateBookmarks:=wdExportCreateNoBookmarks,
DocStructureTags:=False, _[/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2][COLOR=black] 
[/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2][COLOR=black]            BitmapMissingFonts:=True,
UseISO19005_1:=False[/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2][COLOR=black] 
[/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2][COLOR=black]    .Close
SaveChanges:=wdDoNotSaveChanges[/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2][COLOR=black] 
[/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2][COLOR=black]End With[/COLOR][/SIZE][/FONT][FONT=Courier
New][SIZE=2][COLOR=black] 
 
[/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2][COLOR=black]wordApp.Quit
SaveChanges:=wdDoNotSaveChanges[/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2][COLOR=black] 
 
[/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2][COLOR=black]Set wordApp = Nothing[/COLOR][/SIZE][/FONT][FONT=Courier
New][SIZE=2][COLOR=black] 
[/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2][COLOR=black]Set wordDoc = Nothing[/COLOR][/SIZE][/FONT][FONT=Courier
New][SIZE=2][COLOR=black] 
 
[/COLOR][/SIZE][/FONT] [FONT=Arial][COLOR=black][FONT=Courier New][SIZE=2]End Sub[/SIZE][/FONT] 
[/COLOR][/FONT] 

If you like these VB formatting tags please consider sponsoring the author in support of injured Royal Marines


Any help is appreciated.

Sorry for the funky spacing, this forum keeps messing up my post.

I have a workbook containing a pivot table referencing several other large pivot tables. This has made the file size unmanagable. I decided to move these sources to a separate file and just have it linked.

As this file will be accessed by many users, I don't want it to ask for updates every time the file is opened. So I'm trying to disable the update links start-up prompt. I have gone into Edit/Links/Start-up prompt and selected either "Don't display alert and update" or "Don't display alert and do not update".

Despite saving these options the file still prompts upon opening.

I also tried to change the updates from automatic to manual in the save Edit/Links window however the manual option is greyed out. is this because its a pivot table referencing a range of data in the linked file?

Any ideas on how to block this prompt? I'm using Excel 2003

Thanks, Nerina

At my job one of our employees has published an Excel worksheet on our intranet where it can be viewed as an embedded object within Internet Explorer. The sheet is a simple enough affair: some data, some hyperlinks that lead to various cells within the same worksheet and an autofilter to sort the data. The problem is that whenever someone uses the autofilter-function Excel (or IE) will regard that as a change to the worksheet and the next time the user clicks a hyperlink she or he is prompted about saving the file. As you might imagine that gets very annoying very quickly. I've tried protecting the worksheet but that disable the functionality of the Autofilter tabs, which is not an option. Is there some way of stopping Excel from tracking changes to the worksheet so it will stop pestering users about saving "unsaved" changes?

I have a .xls file that presents a graph from an external .csv file. I have
it set to refresh the external data automatically on reopening the .xls file.
It works fine for the most part but Excel gives me two warnings everytime I
use the file that annoy me:

1. Upon opening the .xls file, Excel gives me a warning about how automatic
refreshes can be malicious and forces me to select whether to enable them or
not.

2. Upon exiting, Excel prompts me with a save dialog. It is true that the
data changes (I have it set to clear the external data on close so the .xls
file takes up less space) but I have the graph setup just how I want it so I
honestly don't need Excel to ask me if I want to save it with the new numbers
from the csv each time. Is there a way to disable this? Or perhaps, to have
the graph's source come directly from the .csv file so its all relative?

Hello,
I have a word document containing macros which run automatically when I
launch the document. Specifically, the macro displays a userform which
prompts the user to enter data that will go into the word file but saves a
copy of this word file with the changes. The original file is untouched. So
far so good.

Here is my dilemma: I do not want the macro to run each time I open the
copy of the original file. I found WordBasic.DisableAutoMacros at the
following link but do not know how or where to use it. Can I use this
command to disable auto-open macros from copies but keep the auto-open macros
enabled in the original file? Thanks.

http://word.mvps.org/FAQs/InterDev/D...AutoMacros.htm

Hi All,

I have a sheet that promts me to save even if I have not made changes.
Any way to disable the waring? Is this some setting that I cannot track
down? Thanks, Hetherjw

--
hetherjw
------------------------------------------------------------------------
hetherjw's Profile: http://www.excelforum.com/member.php...o&userid=28195
View this thread: http://www.excelforum.com/showthread...hreadid=477283


No luck finding an answer? You could always try Google.