Excel 2003 VBA崩溃Excel 2007? [英] Excel 2003 VBA crashes Excel 2007?

查看:282
本文介绍了Excel 2003 VBA崩溃Excel 2007?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我们公司最近过渡到Office 2007,我的一个宏崩溃了Excel 2007 - 给出了Excel遇到严重错误并需要关闭始终在代码的相同位置。我梳理了网络,看看2003年和2007年VBA之间是否存在严重差异,但没有发现......这就是代码。我很感激任何建议!

Hi,
Our company recently transitioned to Office 2007 and one of my macros crashes Excel 2007 - gives "Excel encountered a serious error and needs to close" always at the same spot of the code. I combed the web to see if there are grave differences between VBA in 2003 and 2007 and found nothing...this is the code. I would appreciate any suggestions!

展开 | 选择 < span class =codeDivider> | Wrap | 行号

推荐答案

您可以在函数顶部放置一个断点,单步执行直到找到错误,或者您可以进行错误处理并给自己一个msgbox,告诉您错误是什么。
You can put a breakpoint in at the top of the function and step through until you find an error, or you can put in error handling and give yourself a msgbox telling you what the error is.


使用72行代码,您需要指定哪一行它们发生错误。
With 72 lines of code you will need to specify which of them the error occurs on.


NeoPa,

问题是,我不知道。我没有得到VBA错误,我得到Excel遇到严重错误,需要关闭。我怀疑操作pivottable的代码的某些部分不再有效,因为新Excel中的pivottable格式发生了重大变化。我将接受ChipR建议,将代码拉入新的测试工作簿,一次一行地执行代码,直到找到错误。如果我仍然无能为力,我会转发:)

谢谢大家!
NeoPa,
The problem is, I do not know. I do not get the VBA error, I get the "Excel encountered a serious error and needs to close". I suspect some part of the code that manipulates the pivottable is no longer valid, since there were sone significant changes to the pivottable format in the new Excel. I''ll take ChipR advice, pull the code into a new test workbook and step through the code one line at a time until I find the error. I''ll repost if I am still clueless :)
Thank you all!


这篇关于Excel 2003 VBA崩溃Excel 2007?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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