I am getting an error in the
"FileFormat:=xlNormal, Password:="", WriteResPassword:="", _
ReadOnlyRecommended:=False, CreateBackup:=False"
then if I delete them out I get an error on the
"Sheets("Cover Sheet").Visible = False".
I don't feel like it is necessarily the code(It could be). But if it is not that I don't know what it could be.
here is the full code.
Sub Save_Clear()
'
' Save_Clear 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
'Saves file
ActiveWorkbook.SaveAs FileName:= _
"J:T400PS Trend" & PS_SN & "-" & Year & _
"-" & Month & Day & "-" & Test_Run & ".xls", _
FileFormat:=xlNormal, Password:="", WriteResPassword:="", _
ReadOnlyRecommended:=False, CreateBackup:=False
' Opens new Overhaul Input Form
Workbooks.Open(FileName:= _
"J:T400ProgramsT400 DOS.xls" _
).RunAutoMacros Which:=xlAutoOpen
' Closes saved file.
Windows(PS_SN & "-" & Year & "-" & Month & Day & "-" & Test_Run & ".xls").Activate
ActiveWorkbook.Close SaveChanges:=False
End Sub