Jan 20 2023 02:52 AM - edited Jan 20 2023 03:15 AM
My setup:
I struggle with the following problem (and even more problems i will post in a different message).
I made an excel-application I want to bring to the market soon. In Excel 2016 it runs like a charm, but in Microsoft 365 Excel macro's run extremely slow in Microsft 365. At the office we use Office 2016 and it runs all smooth. Does microsoft even look into this problem that exist since 2022? I don't see any progress!!
The most noticable slow downs for me when doing the following action through VBA:
An example from my application:
When the problem stays like this i will go back to office 2019 of 2021, or do I even have to go to office 2016? Does Anyone know if the architecture of Microsoft 365 is differtent from the Office versions 2016,2019,2021?
PLEASE MICROSOFT SOLVE THIS!
I would be happy to share my file with Microsoft so they can find the problem. My application has 7 sheets and 58.000 VBA codelines, so I think this would be THE file to trace the problem(s)!
I hope to hear soon from you, microsoft!
Jan 23 2023 12:08 PM
Jan 24 2023 02:18 AM
Jan 24 2023 12:30 PM - edited Jan 24 2023 01:12 PM
Step 1: I did a repair but that didn't make any difference...
Step 2: I removed and re-installed O365 (standard 64bit) but that didn't make any difference
Step 3: I removed and re-installed O365 32 bit but that didn't make any difference
Any more suggestions?
Jan 25 2023 12:46 AM
Jan 25 2023 12:49 PM
I'm using MS Exel 365
I have a Blackjack simulator that uses VBA. A couple days ago it would take around 3 hours to simulate 100K hands. Now for unknow reason it will take around 8 hours.
I have no idea what could cause the slow down, I'm suspecting there might have been an update in the past few days.
Jan 25 2023 01:52 PM
Jan 25 2023 06:35 PM
Jan 25 2023 10:13 PM
Jan 26 2023 12:52 AM - edited Jan 26 2023 12:52 AM
After your reply I noticed something strange.
When I hit the 'create pdf' button on my userform it takes 38 seconds to finish creating the document and finish the macro'. But When I hit the 'create pdf' button and switch (alt-tab) to the folder in my explorer (and the macro runs in the background) it only takes 13 seconds to finish creating the pdf and finish the macro.... How is that possible?!
And this only happens in O365. In O2016 it works like a charm.
The screenupdating = false still doesn't work well in all routines. In some routines it works well but in others it doesn't. And this only happens in O365
Jan 26 2023 03:20 AM - edited Jan 26 2023 03:32 AM
I do not know the answer but our suspicion must surely be that the two problems are related. Perhaps your "create pdf" button performs an operation that is fast when the screen does not require updating but slow when it does? I really cannot understand how screenupdating=FALSE cannot "work well" - it either works or it doesn't. There is no room for it working badly.
From poor memory, SceenUpdating is not scoped, ie will not reset to TRUE on its own accord. The error in VBA more often than not is to fail to reinstate ScreenUpdating. That said, I cannot recall how Excel deals with a VBA macro exiting while ScreenUpdate remains stuck at FALSE. Surely, Excel cannot tolerate such an exit.
So my suspicion might be that your macro is somehow transitioning between in-macro and out-of-macro state, implicitly setting ScreenUpdating=TRUE whenever transitioning out-of-macro and failing to reinstate ScreenUpdating=FALSE because you do not recognize the transition back to in-macro.
That might explain your language "not well".
Are you using Excel's built-in PDF creator? I would focus my attention at that PDF creator. It seems to interact with your Excel in an unhealthy fashion, differently on O365 than your other version.
Once more, I would comment out the one-line call to the delegated PDF creation to localize the problem. If performance improves, and if the problems with ScreenUpdating somehow go away, you know that both problems relate to that delegation. (The actual PDF creation is unlikely of any relevance to the rest of your code.)
Jan 29 2023 12:55 PM
May 23 2023 06:44 AM
May 23 2023 06:58 AM
A didn't get any response, but have made some changes to my code that helps a bit. Although I would recomend 365 because it has a lot of new things that are very welcome. Like new simplifying formulas and more...
May 24 2024 08:30 AM
My macros universally ran 20-30% slower on a timed basis in Win 11 vs. Win 10; I rolled back to Win 10.