Free Microsoft Excel 2013 Quick Reference

overwritten file

I have accidently overwritten a very important excel 2003 file.
Is there anyway to recover the file?


I have overwritten a file in Excel 2003 and need to retrieve the original. I
do not normally perform a backup. Is there any way to retrieve the original?

I made changes to an excel file and sent it to my office manager instructing her to replace her old file with the new one I made updates to. She did so and afterwards realized that she had data on that file she needed back. Is ther any way to retrieve the file she overwrote?
Tony

How can I restore an overwritten file? I was backing up my files and I
accidentally saved an old version instead of the new one. This sets me back
to May 2009...I cannot find the file I used on Friday Jan 16, 2010.
Help please!!

cannot open excel 2000 file, had repaired with excel 2003 by selecting "open
and recovery " in the dialog box, but only columns with numbers visible, not
any columns with chinese character visible.

possible operation mistake : ( "C" stands for the corrupted file).
1. first open an excel file "A", then double click the file "C" to open it,
but failed. close file "A",double click the file "C" again.

2. add data to file "C", then close it.

3.copy original uncorrupted file from desktop to USB Flash Disk, for some
reasons, the copied file "C" corrupted (but other files in USB Flash Disk are
ok).then copy "C" back to desktop and overwrite the uncorrupted file by
mistake.

the steps one and two may occur one after another, or just one happens.
cannot recall the operation now.

by the way, is it possible to recover the overwritten file (original
uncorrupted file) in desktop?

Your earliest reply will be appreciated!

thanks so much!

cannot open excel 2000 file, had repaired with excel 2003 by selecting "open
and recovery " in the dialog box, but only columns with numbers visible, not
any columns with chinese character visible.

possible operation mistake : ( "C" stands for the corrupted file).
1. first open an excel file "A", then double click the file "C" to open it,
but failed. close file "A",double click the file "C" again.

2. add data to file "C", then close it.

3.copy original uncorrupted file from desktop to USB Flash Disk, for some
reasons, the copied file "C" corrupted (but other files in USB Flash Disk are
ok).then copy "C" back to desktop and overwrite the uncorrupted file by
mistake.

the steps one and two may occur one after another, or just one happens.
cannot recall the operation now.

by the way, is it possible to recover the overwritten file (original
uncorrupted file) in desktop?

Your earliest reply will be appreciated!

thanks so much!

Hello

We are copying some data into Excel (2000) via VBA code in an Access
database (2000). The general idea is we copy the data into an existing
template spreadsheet, and as such we first open the existing template, and
then do a SaveAs to generate the desired results spreadsheet, and then in
later code we start chucking the data into it and doing various things,
followed by the final save.

For some reason we are getting very *very* different speeds based on whether
the SaveAs is overwritting an existing file (fast) cf the SaveAs making a
brand new file. The speed differences are ~10times greater.

As an example if I had an existing file called c:ExamplemyFile.xls, the
VBA code would open the template, execute the .SaveAs method which posts a
warning checking we want to overwrite the existing file, then we do our
processing and data manipulation etc and do a final .Save and close. This
takes ~10secs.
If however we did not have an existing file, the VBA code would open the
template, execute the .SaveAs method which will not post a warning about
overwriting the existing file as the existing file does not exist, then we
do our processing and data manipulation etc and do a final .Save and close.
This takes ~100secs

There is NO difference in execution paths in the code based on whether the
files exist or not, the .SaveAs is executed regardless of whether the file
existed or not. The only perceivable difference is that Excel pops a
warning if the file already existed. The code is posted below

Set xlApp = CreateObject("Excel.Application")
Set xlWorkbook = xlApp.WorkBooks.Open(templateFile)
xlApp.Calculation = xlManual
If bPassword Then
tThisPassWord = GThisPassWord
Else
tThisPassWord = ""
End If

With xlWorkbook
.SaveAs FileName:=ExportFileName, PassWord:=tThisPassWord
End With

<Copy our data over and do some processing and formatting etc>

With xlWorkbook
.Save
.Close
End With

We are also getting the very slow execution if we do the following,
*regardless* of whether the file existed previously or not:
xlApp.DisplayAlerts = False
With xlWorkbook
.SaveAs FileName:=ExportFileName, PassWord:=tThisPassWord
End With
xlApp.DisplayAlerts = True
So if we turn off alerts the code execution is slow as well...

Can anyone help us understand what the issue here is? At this stage we are
not looking for workarounds (such as not doing the first saveAs until the
end), we are looking to trace the cause so that we can eliminate it from
this and any other apps we have.

Please reply to group, email is bogus due to spam killing my NG email
address

Thanks for help
Andrew

I overwrote a spreadsheet with a blank spreadsheet. How do I recover my
previous spreadsheet?

I inadvertently saved a blank Excel file over an existing file. E.g., I had
a file called "web info". I opened a new Excel worksheet and saved it as
"web info". So the original file was overwritten with a blank file. Can I
retrieve the original "web info" file and the data?

I inadvertently saved a blank Excel file over an existing file. E.g., I had
a file called "web info". I opened a new Excel worksheet and saved it as
"web info". So the original file was overwritten with a blank file. Can I
retrieve the original "web info" file and the data?

A client had his file overwritten with a blank copy using the same name. Is
there any way to recover the original file with all the data short of backup
tapes etc?

Hi all,

I have a small problem, below code downloads data to a file and it works. But, next day it wont work again. Either it knows that the file already exist or the file cannot be overwritten. If i remove the file from C:xcelIndex_EveningReport.txt it works again.

Any ideas how to get this work everyday?

Sub URL_Get_Query()

Dim myURL As String
myURL = "http://USERNAME:PASSWORD@fds.nasdaqomxnordic.com/basicdata/yesterday/Index_EveningReport.txt"

Dim WinHttpReq As Object
Set WinHttpReq = CreateObject("Microsoft.XMLHTTP")
WinHttpReq.Open "GET", myURL, False
WinHttpReq.Send

myURL = WinHttpReq.ResponseBody
If WinHttpReq.Status = 200 Then
    Set oStream = CreateObject("ADODB.Stream")
    oStream.Open
    oStream.Type = 1
    oStream.Write WinHttpReq.ResponseBody
    oStream.SaveToFile ("C:xcelIndex_EveningReport.txt")
    oStream.Close
End If

Const MyPath As String = "C:xcelIndex_EveningReport.txt"
   
    With ActiveSheet.QueryTables.Add(Connection:= _
        "URL;" & MyPath, Destination:=Cells(1, 1))
        .Refresh BackgroundQuery:=False
    End With
    
End Sub


Hi all,

I have created a userform within Excel for people to fill in data for a project we're running. Every member has its own file and when it's closed the data in that file gets overwritten. The data is stored on the first sheet, starting from the 2nd row. The amount of data is different in each file as some fill in more than others.

I have created a masterfile with all the links of the project files on the first sheet. On the second sheet I wish to import all the data from the project files. The layout of these files are exactly the same. (only the number of rows with data vary as mentioned above)

Can anyone help me with some VBA code to get all that data into one sheet?

Thank you.

rgds, Marcel

I am modifying an interface between Excel and a FORTRAN code that predicts mechanical parameters of turbomachinery bearings. Users enter specified values in a spreadsheet. Upon selecting the proper command button: Excel exports them to a text file, the executable FORTRAN code reads this text file (input.txt), FORTRAN then calculates desired parameters and outputs them to another text file (output.txt). The VBA code then imports these values (output.txt) to their appropriate cells in Excel. For each new set of user entered values, the input and output files are overwritten. What I would like to do is display an error message if the newest output file is exactly the same as the previous one, i.e., the FORTRAN did not run or the user is trying to re-run the code with the same parameters. I am relatively inexperienced using VBA and need some help. Thanks.

I have master files that employees are overwriting.They are supposed to open the master then saveas "Monday,Tuesday..." Is there a way to only let them Saveas? It also needs to let them save it after the initial Saveas.

Thanks for the help

I have a text file output from a program that is named “ABC123.exp”. I open up the file with Excel and after manipulating the data with VBA code which includes identifying the Source Path directory(strSourcePath As String ) and the File name (strFileName As String) I want to be able to open up a 'Save As' Window and save the manipulated data into the same Source Path directory(strSourcePath) with the File Name being the prefix of the original with a suffix .txt extension. Ex: “ABC123.txt” instead of “ABC123.exp” and the Save as type: Text (Tab delimited)(*.txt). This way my original data won’t be overwritten. Any VBA code to accomplish this would be most appreciated.
Thanks in advance

Hello All,

I have a workbook that will contain multiple worksheets (2000, 2001, 2002….2011). I have a text box on a form that asks a person to enter a 4 digit year and then click a command button called “Import CSV”.

Once “Import CSV” is clicked, I need VBA code to allow the user to select the .CSV file (using the typical “Open” dialog box) that they would like to import. I then need the program to determine if a worksheet exists with the name that the user entered into the text box and if so, display a message stating that data will be overwritten. If there is no worksheet with that name, I would like to have a worksheet created with that name, data imported, and a message stating "Worksheet created. Data imported."

Now, to the specifics:

1) In the .CSV file that needs to be imported, there are approximately 22 columns of data and depending on the time of year, there could be anywhere from a few dozen rows (early January) up to 9,000 (Late December).

2) There is a header row in the imported data that I would like to have as “Times New Roman; Size 8; Bold; Top Row Frozen.

3) The rest of the imported data (starting at row 2) needs to be sorted ASCENDING on the first column (Control#). I would like this data to be “Times New Roman; Size 8”.

The reason for all the automation is that this needs to have the least amount of user interaction as possible since the few end users who will be using this are truly “Excel Newbies”.

Also, since the files are pretty big in size, they will need to be emailed to the prospective contractor:
a) 1 mb .CSV file that contains a sample of the raw data that needs to be imported.
b) 2.5mb sample spreadsheet that I would like the data imported into. I also left a few years worth of data in two sheets to show you how I would like the imported data to look. Lastly, there is also a userform that I would like the code attached to.

If anyone would like to take this up, or if I haven't made myself clear, please message me.

Thanks,

Jon

I am overwriting excel files and when I do that I lose the macro that is in that workbook. Scenario now: I have setup the macro in personal.xls. Every time I overwrite a file, I have to open personal.xls first then pull up that macro and run in the overwritten workbook. How can I overwrite an existing file and use the same macro without opening personal.xls?

I have the following piece of code, which is activated by the user clicking on a print button

Dim stFileName as String
stFileName = Range("firstname") & "," & Range("lastname")

With ActiveWorkbook
.SaveAs stFileName
.PrintOut Copies:=1, Collate:=True

End With

When the user prints again, the user gets a message "A file name AB.xls already exists in this location. Do you want to replace it?"

If the user presses yet, it overwrites (which I do want it to do) but if they press no or cancel I get a debug error.

What I would like is if they press yes, a message to appears to say the file has been overwritten , and if they press no or cancel, a message appears to say nothing has happened.

I've gone round in circles with error handlers, and looking the the forum, but don't seem to be able to crack this.

Help appreciated.

Excel / VBA – Over writing existing file.

I am opening a template file, “C:JobsNew Sheet.xlt”, through a macro and saving it as “C:JobsNew Sheet.xls”, which is already in existence. I want the existing file always overwritten without the warning prompt appearing. What is the code to do this?
Sandy

Hello,

Here is my goal:

I would like to have a macro execute ONLY when a specific file called testa2 is opened. Keep in mind that the file will be overwritten with fresh data each month, BUT I need the functionality to remain where if the file called testa2 is ever opened, then a specific macro is executed.

FYI - I'm currently running in to the issue where the macro, written in vba script, is disappears each time the file is refreshed or recreated. You see, I use a seperate script editor to fresh/recreate the file each month; but when doing so, it also erases the vba coding.

I hope this makes sense but please let me know if I should clarify.

dalex

I have a spreadsheet (Excel 2003 running on Windows XP Pro) at work that is a simple log file and is shared by 5 users. This is simple data entry which doesn't entail any knowledge of Excel except how to open, save and close a file. The file is straight text, it has no formulas, no links, no fancy formatting (except for a simple date format of xx/xx/xxxx) in 2 columns), otherwise, nada. The work book contains a tab for each month of the year.

This file has been corrupted at least 3 times this year. The present corrupted file looks like this: a new case will appear several times on the current worksheet (instead of once). When you search the entire workbook, it appears 3 times on every worksheet since March. It has overwritten the data that originally was contained on those rows. I haven't looked at the file real hard to find additional instances of other cases overwriting data but several months ago when this happened, we had a lot of data overwritten before it was discovered. There have been no error messages. I checked for invisible formulas and links and found none in the entire workbook.

I'm trying to identify WHY this file is being corrupted and to learn how to prevent it from happening in the future. I've shared Excel workbooks at other jobs and I've never seen anything like this. Our "computer support" person insists that one of the users is causing this but can't tell me who or how. If we didn't have other weirdness happening on the network I might be more willing to accept this at face value.

Thanks for any ideas you might have!!

Hi,

I am new to VB, actually just trying to teach myself as I suppose most VB users do.

This isn't my normal (job) role, therefore I'm not too clued up on this but...

Trying to do the following:

I have created a file that requires customer data to be input.

I don't want this file to be overwritten by users. Therefore I require a directory to be created, and the file to be saved in the new directory under the original file name.

The directory needs to be in the name of a certain cell (x = customer surname) on a specific worksheet (y) (only if data in x is entered, otherwise overwrite save is ok).

I have no idea if this is possible, but any ideas or workarounds would be greatly appreciated.

Much obliged.

I accidently overwrote an important excel file. Is their any way to recover this file. I searched the web and I see a bunch of software you have to pay for. Is there anything free and does this software work. Please help.

How do I keep from prompting the user when I save a currently existing file using Save As? Here is my code as it currently exists

Sub SaveAs95()
ActiveWorkbook.SaveAs Filename:= _
"F:Cash ManagementDaily Investment Worksheet V95.xls", FileFormat:=xlExcel5 _
, Password:="", WriteResPassword:="", ReadOnlyRecommended:=False, _
CreateBackup:=False
End Sub

I want the file overwritten every time, so I don't want the user given the option to overwrite the file.