如何使用宏禁用OpenOffice Calc中的保存,另存为菜单项? [英] How to disable menu items like Save, Save As in OpenOffice Calc using Macro?

查看:156
本文介绍了如何使用宏禁用OpenOffice Calc中的保存,另存为菜单项?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我想使用Macro在OpenOffice Calc的文件菜单中禁用保存另存为选项。我尝试了以下代码,

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,

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.

推荐答案

上面的代码是指Microsoft Office Excel BeforeSave 事件,但是你提到你使用的是OpenOffice计算!



请参阅:

使用全局库自动执行OOo Calc [ ^ ]

文件活动 [ ^ ]

创建一个简单的宏 [ ^ ]

Google图书:在OpenOffice.org 3.3中使用电子表格 [ ^ ]
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[^]


这篇关于如何使用宏禁用OpenOffice Calc中的保存,另存为菜单项?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆