Forum Discussion
Excel Macro Runs *PAINFULLY* Slow
No update. As I said, the code was old. I tarted it up some. It is a little better because of that.
Edit: Not much better. It is still terrible.
I am having the same issue with the macros in my organization, they are too slow.
- BeenCodingVBATooLongFeb 15, 2022Copper Contributor
I am hoping you are right. But the fact that they do not seem to be putting VBA support into their online versions while simultaneously trying to push everyone into the online versions says to me that they want to kill macros.
I bet there is a PowerPoint somewhere at MS HQ where they have the number of people who use macros, our ages, and the rate we die on a graph.
They tried this before, and it was the birth of Libre Office.I mean, if I am not running macros, why run the app version of office? If I am running Office through a browser, why would I spend for Windows at all?
It will take people about 15 seconds to decide to go to Libre/Google on Ubuntu.
- Steve_PigsoftFeb 15, 2022Copper ContributorI contacted Microsoft again, today, this time via via https://support.microsoft.com/home about this 'slow macros / slow to close Excel 365' issue. After outlining the issues (including the 4 x extra use of memory by Excel 365 for the same macros now, compared with Excel 2007), running an online 'Repair Office' remote session, the Excel 365/Macros issues persisted, no change, no fix.
However, I have now been assured that this issue will be passed to the relevant Microsoft Tech Team for analysis and a fix.
"The tech team releases updates every month, so I'd need you to be patient for the next update to be rolled out".
A fix in the next release of Office 365 should be the right solution to this current (slow) Excel365/Macros problem, I'm hoping! - IanConversisFeb 14, 2022Copper ContributorHi,
I'd like to add that I have experiecned the same performance issue with a recent patch.
Macros that used to take a couple of mins to run are now taking hours.
Excel is eating up a lot of memory.
once the macros are complete, excel takes an age to close the file, or shut down.
setting application.calculation = xlManual has helped restore some of the performance, but the memory usage is still high and excel doesn't close down properly. - Steve_PigsoftFeb 10, 2022Copper Contributor
Thanks for your suggestions which are appreciated.
As my macros have been in existence and have been working fine and fast for 6 years until Excel 365's (/ Windows 10) recent updates, as others have concluded:
The evidence suggests that my Excel VBA code is not at fault but something in the current Excel 365 VBA handling is causing the problem with VBA speed and slow exits from Excel 365 once macros have been run.
My macros have a lot of code that I really don't want to adjust to work around this Microsoft Excel 365 problem, and I shall hope that Excel 365 can be fixed to run macros at a good pace once more in a future update, like they still do with Excel 2007 and Excel 2010. I have shifted to using these older versions of Excel on alternative Win10 PCs, meanwhile. Thanks goodness I wasn't in a rush to moving all PCs to the current Microsoft (365) offering!
- Olivierb61Feb 09, 2022Copper Contributor
I went back to a reasonable speed by doing all the computation within an array of variant and putting back the array in the sheet (this from MrExcel). It is not the answer we are looking for as it requires a rewrite of the code, but when you are desperate ... (In my case the slowness was caused by a series of update of cells operations). Maybe this can help
Sub Test1() Dim myArray As Variant Dim i As Long Application.ScreenUpdating = False With ThisWorkbook.Worksheets("Sheet1") myArray = .Range("A1").Resize(10, 10) For i = 1 To UBound(myArray) myArray(i, 4) = 111 Next .Range("A1").Resize(UBound(myArray, 1), UBound(myArray, 2)) = myArray End With End Sub
- Steve_PigsoftFeb 09, 2022Copper ContributorI have the same problem: Current Excel for Microsoft 365 (Win 10) is now slow to run and slow to close after running macros from an excel file. These same files and macros still run fine on Excel 2003 and Excel 2007 on alternative Win 10 PCs, and the same macros ran fine on the now-slow PC UNTIL recent updates of Microsoft 365 / Excel 365 on that PC.