从 Excel VBA Workbook_Open 中的致命错误中恢复?

发布于 2024-08-23 11:27:48 字数 195 浏览 2 评论 0原文

我在制作 .xla 时偶然发现了一种在 Workbook_Open 中崩溃 excel 的方法。它仍然是一个玩具项目,所以我能够删除它并重新开始(并且现在我带着版本控制和婴儿步骤回来了。)

但是,假设我没有这些选项,我将如何编辑 .xla 删除致命代码,因为我必须加载它进行编辑,然后加载它导致编辑环境崩溃?

I stumbled on a way to crash excel in Workbook_Open while making an .xla It's still a toy project, so I've been able to just delete it and start over (and now I'm coming back with version control and baby steps.)

However, assuming I didn't have those options, how would I possibly edit the .xla remove the fatal code, since I have to load it to edit, and loading it crashes the editing environment?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

甚是思念 2024-08-30 11:27:48

这不正是您正在寻找的。但在开发过程中的一些建议。

我总是将 xla 文件作为 xls 文件处理,直到它们稳定为止。这样,如果它不稳定,我可以在打开时不启用宏,并修复问题,然后关闭并在启用宏的情况下重新打开。

--编辑--

我做了一些更多的研究,因为我很好奇,而且因为我记得听说过在启动时禁用宏。这里有一个链接,显示您可以在 Excel 启动时按住“Ctrl”以在安全模式下启动。还有一些其他信息值得一读,看看它是否适用。

http://support.microsoft.com/kb/826922

--编辑2--
另一个显示按住“Shift”的链接也可以解决问题

http://www .mrexcel.com/forum/showthread.php?t=348351

This isn't exactly what you are looking for. But some advice during development.

I always work on my xla files as xls files until they are stable. That way if it isn't stable, I can just not enable macros on opening, and fix the problem, then close and reopen with macros enabled.

--EDIT--

I did some more research, because I was curious and because I remembered hearing about disabling macros on startup. Here is a link that says you can hold 'Ctrl' while Excel is starting, to start in Safe Mode. There is a bit of other information that is worth a read to see if it applies.

http://support.microsoft.com/kb/826922

--EDIT 2--
Another link that says holding 'Shift' might also do the trick

http://www.mrexcel.com/forum/showthread.php?t=348351

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文