Do you want to save

A

Alan

I was working on an excel 2003 spreadsheet, in Windows XP, and I had
to check an email for billing purposes. In the email there was a
another spreadsheet that I opened. I printed it and then closed it.

It asked me if I wanted to save the changes and I said no because that
also changes the date of the file and I wanted to leave it at the
original date.

Then I realized that I closed all the Excel files, including the one I
was working on and didn't ask to save the updates. I have a feeling I
know the answer to this but, is there anyway to get that spreadsheet
back. If not, how can I prevent that from happening again. In the
Excel save options, I do ask to retain a copy after 10 minutes but
once I say don't save the changes, isn't that gone too.

Is there no failsafe way to protect these spreadsheets form a
momentary loss of concentration? Is it any different in Excel 2007?

Alan
 
G

Guest

In 2003 you can have the following:

I would put it in the "ThisWorkbook" Code Window.
Sub Auto_Close()
Thisworkbook.Save
End Sub
 
A

Alan

Uh OH

This looks like a language.

Pops,

I have programmed (on a very limited basis) before but this looks like
a language..probably Visual Basic which I never used and have no idea
how to get into. I supposed I should learn it but is there anything I
can do without VB?

Also, "ThisWorkbook" is a variable for whatever workbook is open? What
if there are two that are open? I assume this is a sub-routine
related to something in Excel called Auto_Close so that whenever you
close, the current workbook is updated. What if you are working from
another workbook for another client and you used theirs WB as a
pro-forma. You make the changes for the new client and an auto_close
will kill the old client's WB.

I'd be interested in a file or files being saved as
Auto_Close_ThisWorkbook_1, Auto_Close_ThisWorkbook_2 ...... so that
after you realize what you have done, you can go back and get the WB
you just assinated. Perehaps that is what your sub-routine does but
in case it doesn't, this would be a way to prevent disasters. The
only thing is, you would have to go in and delete all the unused saved
Auto_Close_ThisWorkbook_Ns.

Microsoft doesn't give you this ability anywhere in the options? It's
a shame Lotus isn't breathing down MS's neck anymoe so that the Office
programs could actually evolve.
 
G

Guest

Please forgive my assuming too much.

This is very easy. Press Alt/F11 and the code window will open. On the
left you will see the names of any workbooks that are open at the time.

"ThisWorkbook" refers to the workbook in which the code is resident. If you
double-click the "ThisWorkbook" under the name of your workbook, you will see
the code window. Just copy and paste the three lines there and close the
code window.

When you close the workbook, it will save itself and you will not be asked
if you want to save.

Best wishes,

Jim
--
 
D

D Hilberg

Is there no failsafe way to protect these spreadsheets form a momentary loss of concentration?

Discipline.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top