1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35
| Application.DisplayAlerts = False
Ext_Wbkk.SaveAs Filename:=SavExtrpath & Ext_Wbkkname, FileFormat:=FileFmt, _
CreateBackup:=False, AddToMru:=True, ReadOnlyRecommended:=False
Ext_Wbkk.Saved = True
Application.DisplayAlerts = True
End If
' Email and propose to delete
If Email = True Then
Call SEND_WBK(Ext_Wbkk, Signature)
Msgprompt = "Would you like to delete this workbook from disk? " & vbCrLf & _
Ext_Wbkk.FullName
Msganswer = Msgbox(Msgprompt, vbYesNo, Subname)
If Msganswer = vbYes Then
ThisWorkbook.Activate
Workbooks(Ext_Wbkkname).Close SaveChanges:=False
Kill (SavExtrpath & Ext_Wbkkname)
End If
End If
' Closure, propose to close if still open
If IS_WBK_OPEN(Ext_Wbkkname) = True Then
Msgprompt = "Would you like to close this extract workbook?"
Msganswer = Msgbox(Msgprompt, vbYesNo, Subname)
If Msganswer <> vbNo Then Workbooks(Ext_Wbkkname).Close SaveChanges:=True
End If
Application.EnableEvents = True
Application.DisplayAlerts = True |
Partager