Click here to Skip to main content
15,881,172 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi,
I want to disable Save and Save As options in the File Menu of OpenOffice Calc using Macro. I have tried the following code,
VB
Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
    MsgBox "You can't save this workbook!"
    Cancel = True
End Sub

But it doesn't works, Please help to achieve this. Thank you.
Posted

1 solution

Above code refers to Microsoft Office Excel BeforeSave event, but you mentioned that you use OpenOffice Calc!

See:
Using a Global Library to Automate OOo Calc[^]
Document Events[^]
Creating a simple macro[^]
Google book: Using Spreadsheets in OpenOffice.org 3.3[^]
 
Share this answer
 
Comments
VR Karthikeyan 7-Nov-15 0:32am    
Thank you, useful links.
Maciej Los 7-Nov-15 5:32am    
I'm glad. Can you accept my answer as a solution (green button) - formally to remove the question from unanswered list?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900