[英]Excel 2016 office 365 catastrophic failure
Start to get Excel catastrophic failure error 开始获取Excel灾难性错误
On OK opening debug windows, with auto creating each time new sheets, which is empty and strange structure 在确定中打开调试窗口,每次自动创建新的工作表,这是空的且结构奇怪
If I want something to do appears 如果我想做点事情
So how to delete those sheets? 那么如何删除这些工作表? or fix that error? 或解决该错误? No background process started, file stored in xlsm and xlsb format do the same things. 没有启动后台进程,以xlsm和xlsb格式存储的文件执行相同的操作。 workbook and worksheets is not protected. 工作簿和工作表不受保护。
It looks like the file has been corrupted. 似乎文件已损坏。 It is unlikelly the problem can be easily reproduced from scratch. 这个问题不太可能从头开始很容易地重现。 Never the less you can script a vba macro to delete Sheets based on their names or not delete the sheets you want to keep. 无论如何,您都可以编写vba宏脚本以根据其名称删除工作表或不删除要保留的工作表。
sheetnametodelete= "sheetname"
With Application.Workbooks(ThisWorkbook.Name())
.Unprotect (yourpassword) ' required if protection is set
Dim wks As Worksheet
Set wks = .Sheets(sheetnametodelete)
If (Not wks Is Nothing) Then ' also check if wks belong to the defined blacklist
wks.Delete
End If
.Protect (yourpassword) ' required if protection is set
End With
Try to open the file from another computer in case your local Excel config is corrupted. 如果您的本地Excel配置损坏,请尝试从另一台计算机打开文件。
I had a similar problem (a fake workbook duplicated) in the past and decided to script a build process for my Excel vba based application. 过去我遇到过类似的问题(重复的假工作簿),因此决定为基于Excel vba的应用程序编写构建过程的脚本。
See following links to learn more about module management. 请参阅以下链接以了解有关模块管理的更多信息。
https://www.rondebruin.nl/win/s9/win002.htm https://www.rondebruin.nl/win/s9/win002.htm
http://www.cpearson.com/excel/vbe.aspx http://www.cpearson.com/excel/vbe.aspx
you can also look at this post Import a cls files and create a sheet 您也可以看一下这篇文章, 导入cls文件并创建表格
It provides code and comments from other contributors. 它提供了其他贡献者的代码和注释。 This is obviously not direct answer to your problem but if you intend to work on a consistent vba project I recommand to save your vba code out of your Excel file once in a while and setup a build of your Excel app. 显然,这不是直接解决问题的方法,但是如果您打算在一致的vba项目上工作,我建议您偶尔将vba代码从Excel文件中保存出来,并设置Excel应用程序的构建。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.