Excel Creates Tmp File Everytime Savig File

when I save the file, excel creates tmp file in the same dicectory as the
original file is placed. Everytime i click to save this document, it creates
another tmp file.
When I leave Excel application, tmp files are not deleted.
Is it possible to solve this problem?

Free Excel Help Forum

- Ask any question about Excel and have it answered in no time.

Similar Excel Tutorials

Export an Excel File to a CSV File
How to export an Excel file to a CSV file (comma separated values file).  This allows you to turn any Excel spread ...
Open Excel Workbook Using VBA Macros
Simple way to open an Excel workbook using VBA and macros. Syntax Workbooks.Open ("File Path") Replace file path w ...
Make Your Macros Available in All Workbooks in Excel
In Excel, you can make it so all of your macros can be easily accessed by any Excel workbook. To do this we need t ...
Remove Personal Information from Excel Files
How to remove all personally identifiable information from an Excel file. When a file is created in Excel, it auto ...

Helpful Excel Macros

Save the Current Worksheet as a New Excel Workbook File
- This Excel Macro will save the currently visible/active worksheet (the one that you see when you run the macro) to a
Excel Macro to Save a Specific Worksheet as a New File
- This Excel Macro allows you to save a specific worksheet within the Excel Workbook to its own new file. You will be a
Save the Current Worksheet as a New File in the Current Folder
- This Excel Macro saves the currently visible worksheet into the SAME folder as the current file. It is different from
Prevent Saving a Workbook under a Different File Name
- This Excel macro prevents the user from saving an excel file or workbook under a different file name. The file can only
Open any Program from Excel
- This free excel macro allows you to open any program on your computer from excel. You can open a media player, file vie

Similar Topics

I use Excel 2003 and within the last few weeks, it started creating a new temp file each time I saved the document. Each time I either do ctrl S or hit the save icon, it saves the file and creates a temp file at the same time. If I save the file 10 times, it creates 10 temp files. The only way to get rid of them is to manually delete them.

Please let me know if there is a setting which needs to be changed. I can't remember changing anything but I sure may have.

Thanks for your help.

We have a shared workbook that is modified and viewed by several people throghout the day. Most users are in read only, but 2-4 might be in write mode at one time. The issue we have is that when someone saves the file, the save process is not completing and the original file is deleted, but the temp file is not renamed.
Excel creates the temp file when the shared workbook is opened up, when the user saves the shared file the original file is deleted and then the temp file is renamed to match the original name. The temp file on the server is occasinoally not being renamed and I have to manually rename the temp file to get the file back. This might happen once a week, month... Yesterday it happened 3 times. This happens occasionally on all of our shared files.
Is there a way to prevent this from happening?

I have one user in the office when they save there excel document it creates
a *.tmp file in the current file folder.

Now I checked - Select Tools|General Option and put a check against the
Always Create Backup box before you save the file. But that is not it.

The file created is something like this. dhti4345$0buget200243~.tmp

IF anyone could help that would be greatly appreciated.

I also looked into editing the registry and increasing the cache size but I
would prefer not to do that.

thanks again

Here's a little public service (and a reference point for me the next
time this happens if I forget) for people stuck with this type of Excel

You try to save a file (for me, 53Mb excel file using extensive VBA and
autofiltering to an NTFS compressed network share) and get the
following type of message;

Your changes could not be saved to '<<filename>>.xls", but were
saved to a temporary document named 'D933D120'. Close the
existing document, then open the temporary document and
save it under a new name."

You attempt to save and get an error "File not saved".

You close, reboot, wait for a three-quarter moon etc etc, try to open
the temporary file and get the error
"Excel cannot access 'D933D120'. The document may be read-only or

Thank you to those authors describing the above as a garbage bucket
error message, commonly having nothing to do with either read-only
attributes or encryption, which got me thinking "what else could stop a
file being opened".

Here's the solution;
Right click the file

For me, the security settings were blank. It appears that the saving
process which creates this temp file when "overwriting" (actually
creates new file(the temp file above), deletes old, renames new with
old name) an old file fell over before it could apply the relevant
access lists and rename the file.

Simply add yourself as an authorised user for the file, with full

I was then able to open the file, rename etcetera, as described on the
original error message.

As to the original cause of the issue, ie why the save process fell
?http://support.microsoft.com/kb/291204/ - didn't get identical
messages, so not 100%

?Various mentions of antivirus software - unconfirmed

?NTFS compression - takes so long on some large files that a timeout of
some sort occurs- hypothetical only. May depend on network traffic at
the time.

I have created a macro that creates/saves a text file. The macro will
run on various people's computers and need to create/save the file in
directory that the macro file is located in. By default Excel saves
the file in the directory Excel has been told to put files in.

How do I cause the macro to save the file to the directory the
spreadsheet containing the macro is in?


I am trying to create a MSDOS CSV file anytime the user saves a spreadsheet (i.e. creates a duplicate copy of the data but in a csv file). I used the following command:

ActiveWorkbook.SaveCopyAs "c:\test.csv"

This would allow me to save a CSV file without "modifying" the open workbook\worksheet. But when I attempt to open the csv file in Access, I get garbage. I determined that this is probably do to the file being saved as an "Excel csv" file? What I need is the MS-DOS file type.

The reason behind using the first command was to make sure the user doesn't "know" the file is being created.

Thanks for any help you all can provide.

Hi all,

I have been searching all over to resolve this problem and cannot find any help.

I have creates an Excel Object in VFP to access a Excel file but VFP dose only reads Excel 5.0 format. So I then save the excel file to the new format.

This works well I get a popup which the user has to select "No" for the Excel to save in the required format.

This is the message:
Saving this workbook's VBA project in Excel 5.0/95 file format requires a component that is not currently installed. Do you want to save in the latest Excel format? ...etc

As I said, the answer will be "No" but what parameter would I use to do this.


x=GETFILE("xlsm","Select Agent excel file","Select")



oExcel.WorkBooks(1).SaveAs(NewXLS,39) &&& Save the excel file in a Microsoft Excel 5.0/95 Workbook format

Thanks very much for your help in advance.

I am having an issue with Excel creating a duplicate file when logged in as a user with restricted permissions on our network. If I modify a file while logged in as another user, excel will save the file but will also create a duplicate file with an eight character random name and no file extension. For example if user "Dave" opens a file called test.xls and saves it, in that same folder on the server a file named 296E9E20 will be created. Users are using Windows XP SP3 boxes and the server is running Win 2003. I am not sure why this only happens with Excel.

We have an Excel file which quotes are generated from. This references several data files using vlookup.
The problem is when the master file is saved with data in it the file size is very large e.g. >1Mb even though only a few cells are populated. When a PC is taken off the network the vlookups still work meaning that somehow the background files are being cached.
How do we save the file and make the data returned static so that the file size is smaller - even though the vlookup will not work any more.

I have searched all over and have not been able to find a way to solve my problem. In short, we use text files to save customer information that was created in userforms in Excel (save button on the userform will create a text file. My problem is that the original code created text files that had a delimiter, which I have since changed but there are older text files out ther that users are importing where the delimiter causes a problem.

The problem is caused by a text box that I created where the user can put in "Notes" about the customer such as credit ratings, stock symbol, etc. and they have copied and pasted from an Excel cell from another workbook where there are carriage returns in that cell (multiple lines in one cell). My current process will open up the text file from Excel and they will copy and paste the cells into my model. The old text files, if carriage returns were used, messes up my import cell references because it creates one more line per carriage return used in the original Excel sheet.

I think I can resolve this by having the user select the text file, open up a new workbook and then generate the Clean code below and then copy and paste the updated information into my model (hopefully without the user seeing anything other than selecting the text file.

For Each cl In ActiveSheet.UsedRange
cl.Value = Application.Clean(cl.Value)

Any help would be appreciated. It seems like an easy task but getting frustrating.

I am using a web based trade application to export to a CSV file. When I click export and save as, I enter the file name. When I open Excel I can't see the file. I re-open the trade app, hit save-as and the file is there. I click over write, reopen excel and it is still not there. I have tried to search for the file and it can't be found. I have verified there are no hidden files and that it was saved with csv extension.
Any suggestions.

Excel begginer here, I would really appreciate if someone can help me out on my little excel project.

1. How do I make a sequential Invoice Number that changes everytime I open up the file?

2. Can the file save itself with the current invoice number everytime I click on save, like an auto file name save of some sort.

Thanks in advance.

I have searched everywhere to solve this problem and I have not been able to do so. I have an Excel file that I created for work, it has several macros (about 20) and a few button controls (6 sheets with 3 buttons for each sheet...the buttons trigger the macros, about 4 macros for each sheet).

There are a good bit of vlookups in the files. Basically, I paste about 5 reports to the tabs in the sheet and then use vlookups to produce the report how I want to produce it.

The file is only 1.3 MEG in size. But when I try to save it, it will not save. I have always had problems saving the file, but usually after 5 minutes or so it would finally save. But now I am at the point where it will simply no longer save. This is a critical report that I run weekly and am dead in the water since I can't save it.

I have tried it on many different pc's and it does not work on any PC. Each week I copy the file to a new file and change the filename and keep rolling the file to the next week. THE FILE JUST WILL NOT SAVE. I left it on my desktop for 42 minutes and it was still hanging.

I can send the file to you if you like.

I have tried the following: ensured journaling is off, deleted temp files in windows and user temp directory, rebooted, logged in my laptop as different users to see if it was a profile issue, tried it on my desktop pc, tried repairing it in Excel, tried saving as a different filename and nothing works.

Any idea?


At times i get this error message on excel when i am saving any file.

1. Error were detected while saving c:\.... file name. Microsoft office excel may be able to save the file by removing or repairing some features. To make the repairs in a new file. Click continue. To Cancel Saving the file, click cancel...

2. Click Continue.. it gives another message " Excel encountered errors during save. However excel was able to minimally save your file to c:\ path.. file.xlsb.

3. Clikc ok and get a message in a box "Damage to the file was so extensive that repairs were not possible. Excel attempted to save your formulas and values, but some data may have been lost or corrupted."

But it does not save even if i change the file name.. Im not sure why this is happening on an irregular basis whatever the size of file.. the only formula that i have in that spread sheet is Sumifs and sum...

Can anyone help or seen such similar problem n has been able to rectify.



This morning we started having problems with an Excel file. It can be opened and edited, but when we go to save it it says the file is already in use and to try again later. I know for a fact no one is opening the file, so no physical user here is opening the file. Is it possible the file is being tagged by Windows or Excel as already being opened and not alowing me to save the file even though the only session using the file is me? This is Excel 2007, any help is appreciated!!


We have a network share on a Win2K3 Server where users are trying to save
Excel workbooks to. They do not have the delete permission.
When Excel saves I believe it creates a temp file, then saves the .xls and
then tries to delete the temp file. If the temp file is unable to be deleted
the save fails.
(E.G. If the users have delete permissions they can save OK).

Anyone have a good workaround or fix for this?




I am looking at an application which automatically creates reports every week and emails these reports out then.

Excel takes the values from another application and cretes the report. Angelmail then sends the emails to the clients aith the excel report attached.

When I double click on the excel file running the macros to create the macro, the report file is created.

When I double click the exe file for emailing the report, it sends. The problem I have is that the excel file is not being automatically run on a weekly basis.

There is a scheduler.lst files I dont fully uderstand what this file is doing. Below is the data in the scheduler.lst file.


'Definition                    Day     Start Time   Report         Destination
'File Name                                          Destination    File Name
'C:\.............\fix32\.XLS    1       00:05:00     f              C:\............\reports\monthly\.XLS

'C:\.............\fix32\.XLS    Monday  00:00:10     f              C:\............\fix32\.XLS

'C:\.............\fix32\.XLS    Monday  00:00:12     f              C:\............\reports\weekly\ThisWeek\.XLS

If anybody can offer any help, id appreciate it.

Some EXCEL files display a prompt when closing the file that asks if you want
to save changes even when the file was merely opened and viewed, no cells or
formatting changes were made.

This creates an extra step, "no" must be clicked before the file can be

If the setting that causes the reminder or dialog box to open could be
switched off, in both WORD and Excel it would eliminate this annoyance.

Everytime I open an excel document, I get a series message that say:

'xxxxx.xls' could not be found. Check the spelling of the file name, and verify tha the file location is correct.

If you are trying to open the file from your list of most recently used files on the File menu, make sure that the file has not been renamed, moved, or deleted.

Ofcourse xxxxx.xls is the file name, however here's what's odd. Say my file name is "January Work Report", then I'll get 3 messages where xxx is:

'January.xls' could not be found.
'Work.xls' could not be found.
'Report.xls' could not be found.

Then the file will open.

Any ideas on what this is or how to fix it?

I've been working in an excel file and saving periodically and I input new information. Now, when I try to save, I receive an error "Errors were detected while saving c:/user........
Microsoft excel may be able to save the file by removing or repairing some features. To make the repairs in a new file, click continue. To cancel saving, click cancel.

I did the continue, I entered the file name, and it comes back document not saved. This is when I try to replace the existing file OR when I try to save the file in a different location or as a new file in a different location.

I am using sparklines in the spreedsheet but don't know if that matters. Any help would be great.

I have a gigantic excel file with multiple macros and 10+ tabs. I feel that the file has become corrupt. Excel will not let me save the file as a macro-enabled workbook but instead saves the file where I put it. When I go back to find it the icon for the file is a blank sheet of paper and then I have to specify that the file should be run in Excel. Why does this happen? It will not let me save the file as any other type of file (ie: 2003, 2007). When I go to "save as" the only file type it will let me save as is "Excel Files". It will also not always recognize the new macros that I have built, but still recognizes the old macros I built before the problem started to occur.

Any ideas as to what the problem is and what a solution might be?

Thanks in advance.

Good morning all!

I originally posted this query on the Developer board, as I thought it was a
problem with my code, but now I'm not so sure.

I have a workbook with a macro that runs a Save As within a loop, to create
test data files.

I was finding that for every new file I created, and additional file with a
filename comprisiong eight alphanumeric characters and no file extenson was
created in the same folder.

Thinking that the workbook might be corrupted, I created a new workbook
(with NO copying/pasting from the original - everything types in from
scratch) , created new code modules and copied the code first into Notepad,
then into the new workbook.

The problem still occurred.

Finally, I noticed that it even happened when I did a simple File Save As
from the menu, so I'm fairly certain it isn't my code that's causing the

Could my Excel document template be corrupted in some way?

Can anybody think of any tests or checks I could carry out on my workbook to
look for corruptions that might be causing these additional files to be
creaed? I'm assuming that they're TEMP files that are being created, but not
deleted, during the Save As process.

Yours in desperation, and thanks in advance

Pete Rooney

First, let me state that I have zero VBA experience....

I am trying to create a macro that creates a new excel file and then performs some tasks and then saves the resultant file with a automatically generated and different file name. More specifics are as follows:

I have a excel spreadsheet and the columns have a bunch of payment details (who I have to pay and how much and for what). In the rows, I have a list of multiple companies and each company can have multiple rows (I owe them for multiple invoices). When I process the payment, I have to copy the payment details in the rows for each company into a new file so that I can send the details along witht he payment. (Note that I use the subtotal function in excel the break down each payment by supplier.)

I have created a simple macro that takes the initial file, lets call it the "Master", and copies all the details into a new file. In the new file, the macro deletes all rows, except those associated with the top supplier on the list, now I want to tell the macro to save this new file under the name of the supplier (lets call it cell G3). The macro then goes back to the master and deletes the rows associated with the supplier in the file that was just created and saved and then stops. (My plan is to then assign a shortcut key and keep pressing it until I have rerun the macro the total number of times that I need to in order to get each file that I need for each supplier).

My problem is that I do not know how to tell the macro to save the file with a different file name (i.e cell G3) each time that it is run.

Really could use some help on this one. Thanks in advance.

Hey everyone,

One of my managers is having a unique problem with Excel 2010. She is unable to save, move, or delete her excel file she uses for payroll.

When trying to delete or even just rename the file, the following error appears (see attachment). When going to "File" on excel, it shows the file was opened as Read Only, yet there are no other instances of the file open on any user (Has been happening for weeks).

I checked if this was from "Protected View" but that is always shown on the top when opening the file, which it is not doing in this case.

It's happening quite often with some of her files, and we can't save as a new file each time, as it will cause confusion, and she already printed the wrong file (we have to keep all files) today, so it's getting on her nerves having to work around it all the time. Also, we can't even delete this file if we save a new one to begin with, or rename it.

Any help with this issue would be greatly appreciated.

Howdy... I don't know VBA. I got the below code off the internet and modified it slightly and it works for renaming. It does a 'save as' and replaces part of the filename with the date... it then keeps the new file ('save as' file) open. Problem is, I want the original file open and the 'save as' file closed. I've tried adding various file close and open commands but to no avail.

Restated: After doing a 'save as', I want to close the 'save as' file and open the original file I was working with.


This renames file and keeps 'save as' file open.


Sub ddd()
With ActiveWorkbook
        sMyName = ActiveWorkbook.FullName
        sMyName = Replace(sMyName, "latest.xls", "")
        'MsgBox sMyName & " " & Format(Date, "mmddyy") 'for testing
        Application.DisplayAlerts = False
        .SaveAs sMyName & " " & Format(Date, "mmddyy"), FileFormat:=xlNormal
        Application.DisplayAlerts = True
        '.Close False 'Enable when not testing files
        End With
End Sub