![]() |
Excel macro slows down on second run
Hi. I am facing a problem with the performance of a macro that my
colleague has written. In a nutshell, the macro vlookups for values from various excel workbooks/wooksheets, and put them all into one worksheet (wsSample). The first time it runs, the speed of the macro is "acceptable". After the existing the macro (VBA....passes END), while Excel is still running and the wsSample is still active, if I try to rerun the macro, the speed of the macro drops drastically. However, this problem will not occur if I shut down Excel, restart Excel and rerun the macro. Does anybody know anything about this? --- Message posted from http://www.ExcelForum.com/ |
Excel macro slows down on second run
Try saving the active workbook.
HTH, "lee777 " wrote: Hi. I am facing a problem with the performance of a macro that my colleague has written. In a nutshell, the macro vlookups for values from various excel workbooks/wooksheets, and put them all into one worksheet (wsSample). The first time it runs, the speed of the macro is "acceptable". After the existing the macro (VBA....passes END), while Excel is still running and the wsSample is still active, if I try to rerun the macro, the speed of the macro drops drastically. However, this problem will not occur if I shut down Excel, restart Excel and rerun the macro. Does anybody know anything about this? --- Message posted from http://www.ExcelForum.com/ |
Excel macro slows down on second run
Does the sheet display pagebreaks after running the macro - if so, this may
be the source of the problem. At the top of the macro put ActiveSheet.DisplayPageBreaks = False -- Regards, Tom Ogilvy "lee777 " wrote in message ... Hi. I am facing a problem with the performance of a macro that my colleague has written. In a nutshell, the macro vlookups for values from various excel workbooks/wooksheets, and put them all into one worksheet (wsSample). The first time it runs, the speed of the macro is "acceptable". After the existing the macro (VBA....passes END), while Excel is still running and the wsSample is still active, if I try to rerun the macro, the speed of the macro drops drastically. However, this problem will not occur if I shut down Excel, restart Excel and rerun the macro. Does anybody know anything about this? --- Message posted from http://www.ExcelForum.com/ |
All times are GMT +1. The time now is 10:14 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com