THE SUBROUTINE FOLLOWS. THE LINE THAT WAS HIGHLIGHTED BY THE VBS EDITER WITH THE ERROR MESSAGE IS "Selection.ClearContents". THIS LINE OPERATED O.K. PRIOR TO REPLACING "ACTIVEWORKBOOK.CLOSE" WITH "APPLICATION.QUIT". THANKS FOR YOUR HELP.
Sub Auto_Close()
'
' Auto_Close Macro
' Macro recorded 9/12/02 by SCIORTINOJJ
'
' Saves data to file on share page.
Dim Test_Run As Single
Dim PS_SN As Variant
Dim Year As Variant
Dim Month As Variant
Dim Day As Variant
Test_Run = Range("run_number")
PS_SN = Range("PS_SN_main")
Year = Range("I13")
Month = Range("J13")
Day = Range("K13")
' Takes out the autodate function
Sheets("Cover Sheet").Visible = True
Sheets("Cover Sheet").Select
Range("date_main3").Select
Selection.ClearContents
Range("date_main3").Value = Month & "/" & Day & "/" & Year
Sheets("Cover Sheet").Visible = False
Sheets("Main Input Form").Select
' If operator does not enter a serial number it will not save the file
If PS_SN = 0 Then
Else
ActiveWorkbook.SaveAs FileName:= _
"D:T400PS Trend" & PS_SN & "-" & Year & _
"-" & Month & Day & "-" & Test_Run & ".xls", _
FileFormat:=xlNormal, Password:="", WriteResPassword:="", _
ReadOnlyRecommended:=False, CreateBackup:=False
End If
' Closes workbook
Application.Quit
End Sub