我们使用提图斯进行分类。我可以将宏保存在本地工作簿中,但无法将任何内容保存到我的通用PERSONAL.XLSB工作簿。无论我选择什么选项,提图斯弹出窗口都不会消失。
明显的原因是Titus试图保存到错误的位置,如下图所示。除了禁用Titus之外,还有其他解决方法吗?我用的是Win10,使用的是Titus 4.5 HF3,Excel2013。在我升级Win10之前,这个宏保存到了我的personal.xlsb中。(说到升级,我的意思是我得到了一个全新安装的新机器)

发布于 2018-03-25 01:59:50
您可能希望在保存之前使用EnableEvents=False,然后使用EnableEvents = True。
其想法是禁用事件,以便抑制弹出窗口,然后保存文件。保存操作完成后,我们需要启用事件。
Titus是一个Com Addin,通常在

根据您选择的内容设置CustomDocumentProperties。您可以通过单击File-->Info-->Adavnced找到该文件,如下所示

现在,这就是如何通过编程添加customProperties
Application.EnableEvents = False
With ActiveWorkbook.CustomDocumentProperties
.Add "CompanyClassification", False, msoPropertyTypeString, "Company-Public"
.Add "CompanyClassification", False, msoPropertyTypeString, "Company-Internal"
.Add "CompanyClassification", False, msoPropertyTypeString, "Company-Confidential"
.Add "CompanyClassification", False, msoPropertyTypeString, "Company-Secret"
End With
'Do the Save Operation here. Also if your company wants to Comply with EU GDPR (European General Data Protection Regulatory) then add the appropriate footer (Internal/Public/....)
Application.EnableEvents = True我希望这能给你一个如何前进的想法。
发布于 2018-12-26 19:48:50
我发现,如果您编辑Personal.xlsb工作簿并使用BeforeClose方法,则:
Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
Application.EnableEvents = False
End Sub然后调用BeforeClose方法重新启用:
Private Sub Workbook_BeforeClose(Cancel As Boolean)
Application.EnableEvents = True
End Subhttps://stackoverflow.com/questions/43122097
复制相似问题