简体   繁体   中英

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"?

I have no idea how to change the default Yes, No, Cancel setting.

Will appreciate your input.

No

To do this you would need to:

  1. Intercept the SaveAs with a Workbook Event
  2. Exit if the user was using Save rather than SaveAs
  3. Provided your own customised SaveAs UserForm ( UserForm1.Show below as a sample line to an un-designed form)

Note that Events should be disabled to prevent your UserForm Save from re-calling the Workbook_BeforeSave Event

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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