Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Saving Vba Code | Excel Discussion (Misc queries) | |||
code lost after saving | Excel Programming | |||
Saving a Workbook without code | Excel Programming | |||
Code for saving as a .prn file | Excel Programming | |||
code for saving | Excel Programming |