Excel 2016在调用Workbook_BeforeSave事件之前显示“另存为"对话框 [英] Excel 2016 shows SaveAs dialog before invoking Workbook_BeforeSave event
问题描述
Excel 2016(64位)在调用Workbook_BeforeSave事件之前显示另存为"对话框.
Excel 2016 (64 Bit) shows the SaveAs dialog before invoking Workbook_BeforeSave event.
我们有一个带有Workbook_BeforeSave
过程的excel模板(.xltm).如果用户使用Excel的保存"按钮或CTRL+S
,它将自动保存文件(具有指定的路径和文件名).
We have an excel template (.xltm) with an Workbook_BeforeSave
procedure. It saves the file automatically (with specified path & file name) if the user uses Excels "Save" button or CTRL+S
.
此功能适用于32位的早期Excel版本(2000、2003、2010). (我无法使用Excel 2013进行测试.)
This works on previous Excel versions (2000, 2003, 2010) with 32 Bit. (I could not test with Excel 2013.)
但是Excel 2016(64位)首先显示另存为"对话框!
但是,我只需要单击其中一个按钮,然后Excel就会调用Workbook_BeforeSave宏.
However, I only have to click at 1 of the buttons, then Excel invokes the Workbook_BeforeSave macro.
Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
MsgBox "This appears after the SaveAs dialog has opened."
End Sub
预先感谢
推荐答案
找到解决方案:
激活选项打开或保存文件时不显示Backstage ...".
Activate the option "Don't show the Backstage when opening or saving files...".
这篇关于Excel 2016在调用Workbook_BeforeSave事件之前显示“另存为"对话框的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!