I have an Excel spreadsheet that has an "Input" tab where the user enters their information, a "Results" tab that performs calculations based on that input. I want to be able to email the "Results" to a client without the "Input" information. I entered the "SaveAs" script then recorded the remainder of the script to Copy/Paste Special to enable deletion of the "Input" tab. I can't figure out why I am getting the error message "Select method of Range Class Failed"
Any help would be most apreciated.
Any help would be most apreciated.
Code:
Private Sub CommandButton1_Click()
ActiveWorkbook.SaveAs "C:\Documents and Settings\Terry\" & ActiveSheet.Cells(9, 2) & ".XLS"
Sheets("Results").Select
Range("A1:C37").Select
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Sheets("Input Sheet").Select
Application.CutCopyMode = False
ActiveWindow.SelectedSheets.Delete
ActiveWorkbook.Save
End Sub