1个回答
展开全部
Excel自己就有这个功能啊?不过如果你要的话,我就给你:
Private Sub Workbook_BeforeClose(Cancel As Boolean)
If MsgBox("是否保存?", vbYesNo + vbQuestion, "保存提示") = vbYes Then
ActiveWorkbook.SaveAs Filename:="C:\123.xls" _
, FileFormat:=xlExcel8, Password:="", WriteResPassword:="", _
ReadOnlyRecommended:=False, CreateBackup:=False
End If
End Sub
Private Sub Workbook_BeforeClose(Cancel As Boolean)
If MsgBox("是否保存?", vbYesNo + vbQuestion, "保存提示") = vbYes Then
ActiveWorkbook.SaveAs Filename:="C:\123.xls" _
, FileFormat:=xlExcel8, Password:="", WriteResPassword:="", _
ReadOnlyRecommended:=False, CreateBackup:=False
End If
End Sub
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询