пʼятниця, 22 червня 2018 р.

Excel VBA has started to work slowly

There is a bug with an Office 2016 VBA engine which results in the VBA Mid function to work extremely slow. Like thousands times slower. A simple script which is supposed to run less than a second could execute (and freeze Excel since VBA is a single-thread environment running in the GUI thread) during 10-15 minutes.
I solved it by executing the following commands in the command prompt of my Windows machine where Excel macroses needs to run.

cd %programfiles%\Common Files\Microsoft Shared\ClickToRun 
officec2rclient.exe /update user updatetoversion=16.0.9001.2138

Don't forget to switch off office updates :)

You can find available Office version releases here:

For more information and detailed examples, please read this awesome article:

Немає коментарів: