In a worksheet, I have a large number of formulas/data/cells. I want to paste them as values and then save/close the file. I have the following code:
With Workbooks("Sample Workbook").Worksheets("Sheet1").UsedRange
.Value = .Value
End With
Workbooks("Sample Workbook").Save
Application.Quit
However, the code gives the out of memory error at .Value = .Value
line. How do I fix it?