Excel VBA应用程序自动停止,消息“代码执行已停止” [英] Excel VBA App stops spontaneously with message "Code execution has been halted"

查看:565
本文介绍了Excel VBA应用程序自动停止,消息“代码执行已停止”的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

从网页上可以看到,这是一个相当普遍的投诉,但答案似乎更为罕见。问题是这样的:



我们有许多Excel VBA应用程序可以在许多用户的机器上完美工作。然而,在一台机器上,他们停止了某些代码行。它总是相同的线条,但这些线似乎没有任何共同之处。



如果在停止后按F5(运行),应用程序将继续,所以它几乎就像一个断点被添加。我们尝试从菜单中选择删除所有休息,甚至添加休息并再次删除。



之前我们已经遇到过单独的应用程序的问题, '通过将代码从模块中删除,编译然后将其粘贴回来等等。



现在的问题似乎与Excel本身有关,而不是单一的.xls,所以我们有点不确定如何管理这个。



任何帮助将被感激地收到:)



谢谢,



Philip Whittington

解决方案

我发现第二个解决方案。


  1. 按弹出式窗口中的调试按钮。


  2. 点击播放按钮继续。

  3. 保存文件完成后。

希望这有助于某人。


From what I can see on the web, this is a fairly common complaint, but answers seem to be rarer. The problem is this:

We have a number of Excel VBA apps which work perfectly on a number of users' machines. However on one machine they stop on certain lines of code. It is always the same lines, but those lines seem to have nothing in common with one another.

If you press F5 (run) after the halt, the app continues, so it's almost like a break point has been added. We've tried selecting 'remove all breaks' from the menu and even adding a break and removing it again.

We've had this issue with single apps before and we've 'bodged' it by cutting code out of modules, compiling and then pasting it back in etc.

The problem now seems to relate to Excel itself rather than a single .xls, so we're a little unsure how to manage this.

Any help would be gratefully received :)

Thanks,

Philip Whittington

解决方案

I have found a 2nd solution.

  1. Press "Debug" button in the popup.
  2. Press Ctrl+Pause|Break twice.
  3. Hit the play button to continue.
  4. Save the file after completion.

Hope this helps someone.

这篇关于Excel VBA应用程序自动停止,消息“代码执行已停止”的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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