![]() |
Disabling SAVE AS Temporarily
Hello;
I need to disable the File option Save As while the file test.xls is open, and return to normal File options on exit. How to do that ?? The following w/b event DOES NOT produce the desired effect: Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean) 'MS Excel help: SaveAsUi True if the Save As dialog box will be displayed SaveAsUI = False End Sub Thank you. |
Disabling SAVE AS Temporarily
How about
Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean) If SaveAsUI Then MsgBox ("The 'Save As' function has been disabled."), vbInformation, "Save As Disabled" Cancel = True End If End Sub HTH, JP On Jan 7, 9:34*pm, monir wrote: Hello; I need to disable the File option Save As while the file test.xls is open, and return to normal File options on exit. How to do that ?? The following w/b event DOES NOT produce the desired effect: Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean) 'MS Excel help: SaveAsUi True if the Save As dialog box will be displayed * * SaveAsUI = False End Sub Thank you. |
Disabling SAVE AS Temporarily
Perfect! Thank you very much.
"JP" wrote: How about Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean) If SaveAsUI Then MsgBox ("The 'Save As' function has been disabled."), vbInformation, "Save As Disabled" Cancel = True End If End Sub HTH, JP On Jan 7, 9:34 pm, monir wrote: Hello; I need to disable the File option Save As while the file test.xls is open, and return to normal File options on exit. How to do that ?? The following w/b event DOES NOT produce the desired effect: Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean) 'MS Excel help: SaveAsUi True if the Save As dialog box will be displayed SaveAsUI = False End Sub Thank you. |
Disabling SAVE AS Temporarily
Glad to hear it worked!
--JP On Jan 8, 12:04*am, monir wrote: Perfect! *Thank you very much. "JP" wrote: How about Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean) If SaveAsUI Then MsgBox ("The 'Save As' function has been disabled."), vbInformation, "Save As Disabled" Cancel = True End If End Sub HTH, JP On Jan 7, 9:34 pm, monir wrote: Hello; I need to disable the File option Save As while the file test.xls is open, and return to normal File options on exit. How to do that ?? The following w/b event DOES NOT produce the desired effect: Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean) 'MS Excel help: SaveAsUi True if the Save As dialog box will be displayed * * SaveAsUI = False End Sub Thank you.- Hide quoted text - - Show quoted text - |
All times are GMT +1. The time now is 12:24 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com