View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Darren Hill Darren Hill is offline
external usenet poster
 
Posts: 47
Default SpecialCells(Formula) -- Value

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(xlCel lTypeFormulas) =
_ ActiveSheet.Range("Print_Area").SpecialCells(xlCel lTypeFormulas).Value

End Sub

Darren