D
Darren Hill
I need to copy a worksheet, and convert all formulas in the copy to values.
I tried the following two methods without success. How can I do this?
Thanks in advance.
Sub CopyWSValues(ws As Worksheet)
ws.Copy After:=Sheets(ThisWorkbook.Sheets.Count)
Cells.SpecialCells(xlCellTypeFormulas).Value =
Cells.SpecialCells(xlCellTypeFormulas).Value
Exit Sub ' other method below
ws.Copy After:=Sheets(ThisWorkbook.Sheets.Count)
ActiveSheet.Range("Print_Area").SpecialCells(xlCellTypeFormulas) =
_ ActiveSheet.Range("Print_Area").SpecialCells(xlCellTypeFormulas).Value
End Sub
Darren
I tried the following two methods without success. How can I do this?
Thanks in advance.
Sub CopyWSValues(ws As Worksheet)
ws.Copy After:=Sheets(ThisWorkbook.Sheets.Count)
Cells.SpecialCells(xlCellTypeFormulas).Value =
Cells.SpecialCells(xlCellTypeFormulas).Value
Exit Sub ' other method below
ws.Copy After:=Sheets(ThisWorkbook.Sheets.Count)
ActiveSheet.Range("Print_Area").SpecialCells(xlCellTypeFormulas) =
_ ActiveSheet.Range("Print_Area").SpecialCells(xlCellTypeFormulas).Value
End Sub
Darren