如果取消保存副本,如何停止宏
问候一并 - 对于仍在查看此网站的任何人来说,这都是一个圣诞难题......这可行,但如果我决定取消该过程(即在此阶段不保存文件并停止该过程),它不会保存该文件,但以下 marco (filltolastrow2) 仍然处于激活状态,如何阻止这种情况发生?
Public Sub SaveaCopyIncomeSheet()
Dim file_name As Variant
file_name = Application.GetSaveAsFilename("Overdue Report - Draft", filefilter:="Excel Files(*.xls),*.xls")
If file_name <> False Then
ActiveWorkbook.SaveAs Filename:=file_name
MsgBox "File Saved!"
End If
filltolastrow2
End Sub
Greetings one and all - a christmas puzzle for anyone still looking at this site...This works but if i decide to cancel the process (ie not save a file and stop the process at this stage) it doesn't svae the file but the following marco (filltolastrow2) is still activated how can I stop this happening?
Public Sub SaveaCopyIncomeSheet()
Dim file_name As Variant
file_name = Application.GetSaveAsFilename("Overdue Report - Draft", filefilter:="Excel Files(*.xls),*.xls")
If file_name <> False Then
ActiveWorkbook.SaveAs Filename:=file_name
MsgBox "File Saved!"
End If
filltolastrow2
End Sub
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
你可能想要
You possibly want
选择:
Alternative: