jassybun
Member
I am trying to do a save as values in a copy of a report that I have. This works if I Dim as a worksheet, and it goes through all the worksheets. However, because I have pivot tables now in the first six tabs, this is no longer working. Instead I would like to do a save as values for 6 particular worksheets that have formulas, and leave the pivot tables as is.
This is the formula I currently have.
I tried to change it to....Set wk = Worksheets("Sheet1") but not sure how to put it all together to look through the 6 specific sheets I need it to.
This is the formula I currently have.
I tried to change it to....Set wk = Worksheets("Sheet1") but not sure how to put it all together to look through the 6 specific sheets I need it to.
Code:
Sub SaveAsValues()
Dim ws As Worksheet
ActiveWorkbook.RefreshAll
For Each ws In Worksheets
ws.UsedRange = ws.UsedRange.Value
Next ws
ThisWorkbook.SaveAs "V:\Folder"
End Sub
Last edited by a moderator: