I have the following code. Everything works fine, Except for the PasteSpecial. I end up with a new file with only one sheet named "Results" - but the formulas are still present - obviously I just want the Values. I've tested the PasteSpecial code by itself and it works fine. No errors are generated. Any ideas what is going on here???
Code:
Private Sub CommandButton1_Click()
ActiveWorkbook.SaveAs "C:\Documents and Settings\Terry\" & ActiveSheet.Cells(9, 2) & ".XLS"
Sheets("Results").Select
Dim R As Range
Set R = Range("A1:C37")
R.Copy
R.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Application.CutCopyMode = False
Sheets("Input Sheet").Select
Application.DisplayAlerts = False
ActiveWindow.SelectedSheets.Delete
Sheets("Sheet2").Select
ActiveWindow.SelectedSheets.Delete
Sheets("Sheet3").Select
ActiveWindow.SelectedSheets.Delete
ActiveWorkbook.Save
End Sub