I am trying to change all of the formulas in Sheet1 of an Excel Workbook to the values. After this, I will save the workbook under a new name. Can someone please help with the code below. I have commented out in Step 4 what I wrote that does not work.
Dim xl As Object
'Step 1: Start Excel, then open the target workbook.
Set xl = CreateObject("Excel.Application")
'Step 2: Make Excel visible
xl.Visible = True
'Step 3: Refresh the data
'Step 4: Save the Cash_Template as a different file name
' xl.activeworkbook.sheets("Sheet1").PasteSpecial xlPasteValues
'Step 5: Memory Clean up.
Set xl = Nothing