+ Reply to Thread
Results 1 to 5 of 5

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

  1. #1
    Registered User
    Join Date
    10-11-2020
    Location
    Israel
    MS-Off Ver
    2016
    Posts
    1

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

    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?

  2. #2
    Forum Expert Logit's Avatar
    Join Date
    12-23-2012
    Location
    North Carolina
    MS-Off Ver
    Excel 2019 Professional Plus - 2007 Enterprise
    Posts
    6,986

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

    .
    I have experienced the same thing when attempting to upgrade from WIN 10 - 32bit / Excel 2007 ... to ... WIN 10 - 64bit / Excel 2019 .

    After several weeks of attempting to get my previously flawless running macros to function as designed in 2007 ... I went back to using
    2007 but kept the OS as WIN 10 / 64 bit. No problems since changing back.

    Now we can sit here and discuss all the possible variables of "Why" ... but frankly I enjoy the humorous approach ...

    The problems are purposely caused by Microsoft to encourage users to fully upgrade and never look back.

    So much for MS built-in amenities.

  3. #3
    Forum Expert Logit's Avatar
    Join Date
    12-23-2012
    Location
    North Carolina
    MS-Off Ver
    Excel 2019 Professional Plus - 2007 Enterprise
    Posts
    6,986

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

    .
    Oh ...

    You could try re-writing your entire project in a brand new workbook using the upgraded environment. Hopefully that will
    eliminate the errors.

  4. #4
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2403 Win 11 Home 64 Bit
    Posts
    23,810

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

    crossposted: https://chandoo.org/forum/threads/ma...dows-10.45156/

    Rule 03: Cross-posting Without Telling Us

    Your post does not comply with Rule 3 of our Forum RULES. Do not cross-post your question on multiple forums without telling us about your threads on other forums.

    Post a link to any other forums where you have asked the same question.

    Cross-posting is when you post the same question in other forums on the web. The last thing you want to do is waste people's time working on an issue you have already resolved elsewhere. We prefer that you not cross-post at all, but if you do (and it's unlikely to go unnoticed), you MUST provide a link (copy the url from the address bar in your browser) to the cross-post.

    Read this to understand why we ask you to do this.

    I have added the crosspost reference for you today. Please comply with this and all our rules in the future
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  5. #5
    Registered User
    Join Date
    08-25-2015
    Location
    London, England
    MS-Off Ver
    2013
    Posts
    30

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

    Was having issues using vba code when I moved from windows 7 to 10. I was using 64bit version of Windows 10 and installing 64bit version of office 2019 worked for me. Don't know why but there yu go. Previously i was using 32bit version of ofice on windows 7 but on windows 10, when installing 32bit version of office, it would corrupt my workbook.

    hope that helps

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 4
    Last Post: 04-28-2019, 08:47 AM
  2. Issue with Macro/Object since upgrading to Office 2016 from 2010
    By brett129 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 01-30-2018, 05:13 PM
  3. Replies: 1
    Last Post: 12-18-2016, 11:47 PM
  4. [SOLVED] Code not working in Office 2010 and Office 2016
    By amitmodi_mrt in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-21-2016, 02:48 PM
  5. switching from office 2010 to office 365
    By kosherboy in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 09-02-2015, 04:40 PM
  6. [SOLVED] Excel Windows 2007 to Macro 2011 Office
    By cheeze83 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 01-30-2014, 12:10 PM
  7. Replies: 1
    Last Post: 10-12-2012, 05:59 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1