bamaisgreat
Well-known Member
- Joined
- Jan 23, 2012
- Messages
- 831
- Office Version
- 365
- Platform
- Windows
The code below is what I am currently using. Looking through the code you will see that I save the workbook as the current date and time. The problem Im having is that I would like sheet1 to be the only one to save. I have several more sheets in this workbook that I dont want in the save as date and time.
Code:
ActiveWorkbook.SaveAs Filename:="H:\Burney Table\CUTTING FORMS (Protected by QC)\" & _
Format(Now(), "mm-dd-yyyy hh-mm-ss") & " 56 Mach STOCK FORM", FileFormat:=xlNormal _
, Password:="", WriteResPassword:="", ReadOnlyRecommended:=False, _
CreateBackup:=False
Range("I4").Select
ButtonNames = Array("Button 4")
For Each ButtonName In ButtonNames
ActiveSheet.Buttons(ButtonName).Visible = False
Next ButtonName
ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, Filename:= _
"H:\Burney Table\Cutting Forms PDF\" & Format(Now(), "mm-dd-yyyy hh-mm-ss") & " 56 MACH STOCK.pdf", Quality:= _
xlQualityStandard, IncludeDocProperties:=True, IgnorePrintAreas:=False, _
OpenAfterPublish:=True
ActiveWorkbook.Save
ActiveSheet.Unprotect
With Range("$g$1:$j$1")
.Locked = False
.FormulaHidden = False
End With
ActiveSheet.Protect Password:="1288", DrawingObjects:=True, Contents:=True, Scenarios:=True
ActiveWindow.Zoom = 147
ActiveWorkbook.Save
Workbooks.Open ("H:\Burney Table\56 MACHINE\operators form\56 MACHINE.xls")
Windows("56 MACHINE.xls").Activate
ThisWorkbook.Close SaveChanges = True
Application.Quit
End Sub