经过一些运行宏后,Excel变得非常慢 [英] Excel becomes very slow after a few running macro's

查看:1746
本文介绍了经过一些运行宏后,Excel变得非常慢的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Excel 2003中编写了一个Excel应用程序。它运行没有问题。我在Excel 2007中运行此文件,运行visual basic宏后,它变得非常慢。宏运行没有任何区别。运行宏后文件大小从
1 Mb增加到20-30 Mb,并且正在急剧增加。处理器时间为50%,只有运行宏的时间才会增加。内存usige越来越多。我已删除该工作簿中的多个工作表,以检查这些工作表中使用的公式
是否会导致问题变得严重。硬件没有影响力。此文件用于不同的计算机。谢谢你的帮助。

I have written an Excel application in Excel 2003. And it is running without problems. I run this file in Excel 2007 and after running visual basic macro's it becomes very slow. It makes no difference wich macro is running. The file size increases from 1 Mb to 20-30 Mb after running the macro's, and is increasing dramaticly. Processor time is 50% and only the time to run the macro is increasing. Memory usige is increasing more and more. I have deleted several sheets in that workbook, to check if the formulas used in these sheets coarsing the problem. Hardware hase no influence. this file is used at different machines. Thanks in advace for your help.

推荐答案

你好,

不确定你是否在合适的论坛(听起来像VBA问题?),但有两件事要检查。

Not sure if your in the right forum (sounds like a VBA issue?), but there's two things to check.

1。你的宏实际上已停止了吗? - 单击宏检查它是否仍然列为[正在运行]。

1. Has your macro actually stopped? - Check by clicking on Macros to see if it is still listed as [running].

(您可能会发现正在循环工作簿中的其余空单元格。)

(You might find you are looping through the remainder of the empty cells in a workbook.)

2。您是否在运行宏后保存工作簿? - 内存使用率会上升,因为Excel可能会跟踪所有更改,因此您可以"撤消"宏所做的任何工作。尝试在宏完成时保存工作簿并检查文件大小是否正常。

2. Are you saving the workbook after running a macro? - Memory usage will go up because Excel is likely to track all the changes so you can 'undo' any work a macro does. Try saving the workbook when the macro finishes and check if the file-size looks normal.

 

最后记住你的宏可以存储在里面工作簿! - 如果您要"导入"预制宏,这可能是文件大小的增加。

Finally remember your macro can be stored inside the workbook! - This might be the increase in filesize if you are 'importing' a premade macro.

 

希望这有帮助,

DJ PIP


这篇关于经过一些运行宏后,Excel变得非常慢的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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