简体   繁体   English

将excel VBA中SaveAs对话框上的“取消”文本更改为“审核”

[英]change the “Cancel” text on SaveAs Dialog box in excel VBA to “Review”

Is there a way to change the "Cancel" text on SaveAs Dialog box in excel VBA to "Review"? 有没有办法将excel VBA中SaveAs对话框上的“取消”文本更改为“查看”?

I have no idea how to change the default Yes, No, Cancel setting. 我不知道如何更改默认的Yes,No,Cancel设置。

Will appreciate your input. 非常感谢您的意见。

No 没有

To do this you would need to: 为此,您需要:

  1. Intercept the SaveAs with a Workbook Event 使用Workbook事件拦截SaveAs
  2. Exit if the user was using Save rather than SaveAs 如果用户使用的是Save而不是SaveAs则退出
  3. Provided your own customised SaveAs UserForm ( UserForm1.Show below as a sample line to an un-designed form) 提供您自己的自定义SaveAs用户窗体(下面的UserForm1.Show作为未设计表单的示例行)

Note that Events should be disabled to prevent your UserForm Save from re-calling the Workbook_BeforeSave Event 请注意,应禁用Events以防止UserForm Save重新调用Workbook_BeforeSave事件

All up - I'd stay with the defaults! 全部 - 我会保持默认值!

Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
'exit on Save
If Not SaveAsUI Then Exit Sub
Application.EnableEvents = False
Cancel = True
UserForm1.Show
Application.EnableEvents = True
End Sub

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM