copy values from one workbook to another

  • Thread starter Thread starter Jonsson
  • Start date Start date
J

Jonsson

Hi,

I have one workbook containing hundreds of sheets and a huge amount of
formulas.
Is there a way to create a a macro that copy all the values, (no formulas,
no formatting), to a new workbook which are identical to the first one?
This is necessary as I sometimes need to "update" my workbook, whitout
losing all of my manually printed values.
Also there are links to this workbook to other workbooks, therefore it needs
to be renamed to the same name as the old woorkbooks name, to get the links
working as before.

Regards,

Thomas
 
I think that you are into a big job proceeding as you suggest. You wish
to retain the links to other workbooks, right ?

Why don't you just copy the existing workbook under another name ?

If you wish, all you need to do then is record a macro which deletes
rows/columns you don't want and perhaps does Edit/Copy/PasteSpecial
Values to replace formulas with values.

To have this work on all worksheets in the book you can make a loop
like :-

'------------------------------------------------------
Sub reformat_sheets()
For Each ws In Worksheets
ws.Activate
Macro1 ' or whatever your code sub is called
Next
End Sub
'----------------------------------------------
 
Hi,!

I sometimes have to repair some of the formulas of the woorkbook, and
then send the repaired workbook to another user. He/She has already put
in a bunch of values in all the sheets of the broken workbook

If the user choose to replace the old file to the new, repaired file,
all the values will dissapear. I don´t want that to happen.
So therefore, I need a code that just copy the values from the old,
broken file, to the new one that has no values, just formulas. The
files are identic to eachother, exept for the repaired formulas.
If it´s necessary, I can give you the exact rows and columns, where I
need to copy from.
If it´s possible, I´d like this to happen at the same time as the
woorkbook is opened for the first time.
And yes, I also need to retain the links.

Is it possible?

//Thomas
 
Back
Top