[英]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: 为此,您需要:
Workbook
Event 使用Workbook
事件拦截SaveAs Save
rather than SaveAs
如果用户使用的是Save
而不是SaveAs
则退出 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.