[Resolved] Excel is hitting a speed bump
When I first open my database and run it my macro it takes about a minute to run. If I try to rerun this Macro it takes 15 minutes. If I close the Workbook and open it back up it only takes 1 minute again. I am using large Static Arrays, but I use the Erase command to erase these Arrays. Does anyone have any idea why there would be this much slowdown?
Re: Excel is hitting a speed bump
Not very easy to determine without seeing the code and knowing what its doing.
Re: Excel is hitting a speed bump
I think I solved it. My problem was I wasn't turning the screen updating off and then on.
Application.ScreenUpdating = False
code
Application.ScreenUpdating = True
Thanks for the help
Re: Excel is hitting a speed bump
But ScreenUpdating is a performance saver. Were you clicking the button multiple times during the initial macro run or ?
Re: Excel is hitting a speed bump
No I was just running my macro like usual (1 click). The problem was it was trying to always update the text on screen. When I implemented that the screen didn't try to update till the end. Plus my biggest problem is I haven't gotten a handle on all the internal functions in VBA. I am sure their is a search function, but I could never find it and just used a for loop with my array. Thanks for your help
Re: Excel is hitting a speed bump
Oh I see. Yes there is a search function. Its called the Find method. Works off of a Range object. No looping and faster. ;)