Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / New Users / September 2006

Tip: Looking for answers? Try searching our database.

Retrieve Deleted Worksheet

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
kramer.newsreader@gmail.com - 21 Sep 2006 22:33 GMT
I did something very stupid.  I deleted a worksheet from a workbook.  I
thought to myself: there are too many worksheets in this workbook.
That one is blank, so I'll delete it.  Unfortunately, there are some
important macros stored in that worksheet and I don't have another copy
of them.

Is there any way to retrieve them?

Thanks very much
Paul B - 21 Sep 2006 22:48 GMT
If you have not saved the file close it without saving,  if you have not
backed up the file other places to look for a copy, have you e-mailed it?
May be a copy in your sent items folder, if file was on a network server it
probably makes backups at sometime, check with you IT person, have you gave
the file to someone else that might have a copy of it? Copy on another
computer? Other wise I think it is gone, in the future ALWAYS create backup
files of your work.

Signature

Paul B
Always backup your data before trying something new
Please post any response to the newsgroups so others can benefit from it
Feedback on answers is always appreciated!
Using Excel 2002 & 2003

> I did something very stupid.  I deleted a worksheet from a workbook.  I
> thought to myself: there are too many worksheets in this workbook.
[quoted text clipped - 5 lines]
>
> Thanks very much
kramer.newsreader@gmail.com - 22 Sep 2006 00:18 GMT
> If you have not saved the file close it without saving,  if you have not
> backed up the file other places to look for a copy, have you e-mailed it?
[quoted text clipped - 3 lines]
> computer? Other wise I think it is gone, in the future ALWAYS create backup
> files of your work.

Yeah, I have an older version of the file, but I'll lose a good bit of
work.

I guess that I didn't realize those macros were stored in the worksheet
itself (or didn't think about it until it was too late).  Excel says
that data may exist in the worksheet that you are trying to delete.
Maybe it should remind the idiot--I mean user that macros may also
exist.  Stupid, stupid me.
Gord Dibben - 22 Sep 2006 00:30 GMT
If all you want back is the worksheet code, you should not have to lose any
work.

Re-name the old workbook, open it and right-click on the sheet tab and "View
Code"

Copy the code from the sheet and paste it into a sheet in the latest book....the
one from which you deleted the "empty" sheet.

Gord Dibben  MS Excel MVP

>> If you have not saved the file close it without saving,  if you have not
>> backed up the file other places to look for a copy, have you e-mailed it?
[quoted text clipped - 12 lines]
>Maybe it should remind the idiot--I mean user that macros may also
>exist.  Stupid, stupid me.
kramer.newsreader@gmail.com - 22 Sep 2006 00:36 GMT
> If all you want back is the worksheet code, you should not have to lose any
> work.
>
> Re-name the old workbook, open it and right-click on the sheet tab and "View
> Code"

Nice idea, but I had already saved the worknook after deleting the
worksheet (as I have a habit of hitting ctrl-s periodically).

> Copy the code from the sheet and paste it into a sheet in the latest book....the
> one from which you deleted the "empty" sheet.
>
> Gord Dibben  MS Excel MVP
Gord Dibben - 22 Sep 2006 00:50 GMT
Your post responding to Paul stated.....

>Yeah, I have an older version of the file, but I'll lose a good bit of
>work.

That is the "older" book I am referring to.

Copy the code from there.

Gord

>> If all you want back is the worksheet code, you should not have to lose any
>> work.
[quoted text clipped - 9 lines]
>>
>> Gord Dibben  MS Excel MVP

Gord Dibben  MS Excel MVP
kramer.newsreader@gmail.com - 22 Sep 2006 00:33 GMT
One more comment for anyone reading this thread.  If you write VBA
macros in Excel, it is probably a good idea to save them not in any
particular worksheet, but to save them in the workbook (the little box
that says ThisWorkbook under the VBA editor).
Paul B - 22 Sep 2006 00:41 GMT
It depends on what kind of macro it is, some NEED to be in sheet code and
some in thisworkbook code, as Gord said you should be able to just copy the
code and put in you newer workbook

Signature

Paul B
Always backup your data before trying something new
Please post any response to the newsgroups so others can benefit from it
Feedback on answers is always appreciated!
Using Excel 2002 & 2003

> One more comment for anyone reading this thread.  If you write VBA
> macros in Excel, it is probably a good idea to save them not in any
> particular worksheet, but to save them in the workbook (the little box
> that says ThisWorkbook under the VBA editor).
Gord Dibben - 22 Sep 2006 00:53 GMT
And general macros should be stored in a General Module, not in Thisworkbook
module or in a Worksheet module.

Gord

>It depends on what kind of macro it is, some NEED to be in sheet code and
>some in thisworkbook code, as Gord said you should be able to just copy the
>code and put in you newer workbook
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.