L
Logan
I have a workbook template that has 32 sheets in it. Is it
possible to have a macro delete specific sheets if certain
conditions are met when saved.
i.e. if N32 = "Adult" delete sheets 4,5,7,15(Sheet Names)
if N32 = "Youth" delete sheets 6,9,18, 23
I have the following 'Save As' macro and was wondering if
it could be incorporated into it.
Sub Save_As()
Dim FName1, FName2, FName3, Fullname
FName1 = "CK0"
FName2 = Range("AU2").Value & "-"
FName3 = Range("J4").Value
Fullname = FName1 & FName2 & FName3
Application.DisplayAlerts = False
ChDir "C:\Arrest"
ActiveWorkbook.SaveAs Fullname, FileFormat _
:=xlNormal, CreateBackup:=False, _
Accessmode:=xlShared
MsgBox "Saved to " & CurDir & " - " & Fullname
End Sub
Thanks
possible to have a macro delete specific sheets if certain
conditions are met when saved.
i.e. if N32 = "Adult" delete sheets 4,5,7,15(Sheet Names)
if N32 = "Youth" delete sheets 6,9,18, 23
I have the following 'Save As' macro and was wondering if
it could be incorporated into it.
Sub Save_As()
Dim FName1, FName2, FName3, Fullname
FName1 = "CK0"
FName2 = Range("AU2").Value & "-"
FName3 = Range("J4").Value
Fullname = FName1 & FName2 & FName3
Application.DisplayAlerts = False
ChDir "C:\Arrest"
ActiveWorkbook.SaveAs Fullname, FileFormat _
:=xlNormal, CreateBackup:=False, _
Accessmode:=xlShared
MsgBox "Saved to " & CurDir & " - " & Fullname
End Sub
Thanks