G
Guest
Hi
I have a very tricky situation. I want to disble the save option of the workbook. So I wrote this cod
Private Sub Workbook_BeforeClose(Cancel as Boolean
Application.DisplayAlerts = Fals
ThisWorkbook.Saved = Tru
ThisWorkbook.Clos
Application.DisplayAlerts = true
End Su
Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean,
Cancel as Boolean
Application.DisplayAlerts = Fals
Cancel = Tru
Application.DisplayAlerts = tru
End Su
Now the problem is the moment I write this code, it is activated before saving and this code is not saved at all. How do I save this code? My objective is that the user should not be able to save any changes in the workbook
TI
Shilps
I have a very tricky situation. I want to disble the save option of the workbook. So I wrote this cod
Private Sub Workbook_BeforeClose(Cancel as Boolean
Application.DisplayAlerts = Fals
ThisWorkbook.Saved = Tru
ThisWorkbook.Clos
Application.DisplayAlerts = true
End Su
Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean,
Cancel as Boolean
Application.DisplayAlerts = Fals
Cancel = Tru
Application.DisplayAlerts = tru
End Su
Now the problem is the moment I write this code, it is activated before saving and this code is not saved at all. How do I save this code? My objective is that the user should not be able to save any changes in the workbook
TI
Shilps