ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Return WB to original state (https://www.excelbanter.com/excel-programming/350287-return-wb-original-state.html)

Ronbo

Return WB to original state
 
Does anyone know of a way to:

1. After perfroming a lot of calculations in a workbook (well over 100 and
to many to consider undo)

2. Keep/Save results (this only consists of 12 cells)

3. Get the WorkBook back to the original state.

4. Paste in the new results.

Also;

Can I "SaveAs" and keep the original WorkBook open and active?

Can I create a Copy of an open WorkBook?

As always, any help is appreciated.

Regards



Before I go to a lot of work trhrough a real roundabout method I am looking
for someone

GB

Return WB to original state
 
If you saveas, then your "original" workbook is no longer open. However, if
you saved the workbook before you did the calculations, you can then reopen
it after the saveas. (Capture the current file location, saveas, then open
the file that was previously open.)

This would allow you to copy the "12" cells that have your new data, into
your, "existing" workbook. Of course, then you may have to delete the "new"
workbook, or just keep the calculation file around and handle saveas errors
when they happen. I think this would be your best route pending better ideas.

"Ronbo" wrote:

Does anyone know of a way to:

1. After perfroming a lot of calculations in a workbook (well over 100 and
to many to consider undo)

2. Keep/Save results (this only consists of 12 cells)

3. Get the WorkBook back to the original state.

4. Paste in the new results.

Also;

Can I "SaveAs" and keep the original WorkBook open and active?

Can I create a Copy of an open WorkBook?

As always, any help is appreciated.

Regards



Before I go to a lot of work trhrough a real roundabout method I am looking
for someone


Ronbo

Return WB to original state
 
Thanks, this is within the realm of my workarounds. I was hoping for a
cleaner easier way.

"GB" wrote:

If you saveas, then your "original" workbook is no longer open. However, if
you saved the workbook before you did the calculations, you can then reopen
it after the saveas. (Capture the current file location, saveas, then open
the file that was previously open.)

This would allow you to copy the "12" cells that have your new data, into
your, "existing" workbook. Of course, then you may have to delete the "new"
workbook, or just keep the calculation file around and handle saveas errors
when they happen. I think this would be your best route pending better ideas.

"Ronbo" wrote:

Does anyone know of a way to:

1. After perfroming a lot of calculations in a workbook (well over 100 and
to many to consider undo)

2. Keep/Save results (this only consists of 12 cells)

3. Get the WorkBook back to the original state.

4. Paste in the new results.

Also;

Can I "SaveAs" and keep the original WorkBook open and active?

Can I create a Copy of an open WorkBook?

As always, any help is appreciated.

Regards



Before I go to a lot of work trhrough a real roundabout method I am looking
for someone


GB

Return WB to original state
 
Another option, would be to save your current copy
copy the original workbook.
Open the new copy
perform the calculations on the copy
copy the new data to your original file
close the copied file (one with the calculations)
and then remove the copy.

I guess another alternative depending on how many worksheets are involved
and the way that your code is setup to work with the different worksheets,
would be to copy the worksheet(s) on which calculations are performed, then
and this is a function of the length of data in every cell, copy all of the
data in the worksheet to the new copy. I say this, because if any cell as
more than 255 characters in it, copying the worksheet will not copy the full
length of the cell, only the first 255.

Then do your calculations on your new copy(ies). Copy the data that you
need into your "original" worksheet, and then you can either delete the new
copy, or if you have planned things out well, you could keep that "copy"
sheet around from day of deployment, and have it VeryHidden so that the users
can not unhide the worksheet. A bit cleaner, don't you think?

"Ronbo" wrote:

Thanks, this is within the realm of my workarounds. I was hoping for a
cleaner easier way.

"GB" wrote:

If you saveas, then your "original" workbook is no longer open. However, if
you saved the workbook before you did the calculations, you can then reopen
it after the saveas. (Capture the current file location, saveas, then open
the file that was previously open.)

This would allow you to copy the "12" cells that have your new data, into
your, "existing" workbook. Of course, then you may have to delete the "new"
workbook, or just keep the calculation file around and handle saveas errors
when they happen. I think this would be your best route pending better ideas.

"Ronbo" wrote:

Does anyone know of a way to:

1. After perfroming a lot of calculations in a workbook (well over 100 and
to many to consider undo)

2. Keep/Save results (this only consists of 12 cells)

3. Get the WorkBook back to the original state.

4. Paste in the new results.

Also;

Can I "SaveAs" and keep the original WorkBook open and active?

Can I create a Copy of an open WorkBook?

As always, any help is appreciated.

Regards



Before I go to a lot of work trhrough a real roundabout method I am looking
for someone



All times are GMT +1. The time now is 05:06 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com