• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Macro getting stuck after switching from Office 2010/Windows 7 to Office 2016/Windows 10

Elinoy

New Member
I have a VBA macro that runs every ten minutes, all day (using Application.onTime). The macro was initially written in an Office 2010 file in Windows 7 Enterprise, and worked flawlessly for two years.

Recently, we upgraded our desktops to Windows 10 Enterprise and Office 2016, and the macro stopped running properly. The macro stopped running properly also when only upgrading the Office 2010 to 2016 in a Windows 7 desktop.

At first, I got a lot of runtime errors ‘1004’ with debug (Select methods, PasteSpecial methods, etc). When I clicked on the debug option and let it continue with F5, the macro kept going without problems.

After some time, I only got generic automation errors popups without a debug option. Then, after some more time, the behavior was such that the macro got terminated without any popups, and the excel file was closed and opened in a recovered version, while the macro was not running anymore.

Need to say that the macro still works OK in the majority of runs, but once in a while it gets stuck (around 5% of the runs during the day).
The macro contains a lot of code (25 modules). It opens existing excel files and does a lot of numeric data manipulation (copy, select, delete, pivot, formulas, mail sending, etc). Every run of the macro, it performs the same operations on different data.

My question is, what can be the reason for a macro that worked in Office 2010, to get stuck in Office 2016? How is it possible to return the debug option, or any other option to debug and understand the problem further?
 

vletm

Excel Ninja
Elinoy
As a new member, You should reread Forum Rules
... because, You seemed already forget some basic sentences from that.
 
Top