Reasons a macro would suddenly quit working on some Windows 10 devices and not others.

What are some reasons a Sage 300 macro would suddenly quit working in Windows 10?  We have five Windows 10 clients, and the macro has quit working on four of the five clients.  Sage 300 itself still works fine.  We don't know when it broke given, we only use it quarterly.   Also, what are some ways to troubleshoot/diagnose the issue?  Are there logs that we can look at that a Sage macro would create? 

Here are some additional notes about the macro.

  • The macro has an AVB extension.
  • The macro was developed by a third-party vendor who we no longer have access to, although I think we still have the source code (if that is the right term).
  • The macro has been in use for over a decade. 
  • The macro lives on a shared folder (so everyone uses the same macro)
  • The macro has to be recompiled/re-saved anytime we upgrade Sage 300 to a new major version.  The last time it was recompiled was in 2021 which was when we upgraded from Sage 300 2018 to Sage 300 2021.
  • The macro's normal behavior is to prompt the user to select an Excel file and then import the data from the Excel file into Sage 300.  When working, the user gets a prompt.  On the machines that it isn't working, the user doesn't see anything.  No errors.  Nothing.  

Thank you!

  • 1. You don't have to recompile AVB macros

    2. 64-bit Excel won't work.

  • ^ What Jay said. Also, check if there are any references missing in the VBA project from the workstations that don't work. Could be that an Office update changed significantly enough to change the dlls referenced in the macro.

  • 0 in reply to Jay Converse Acumen

    Thank you!  There was something our macro vendor did when we upgraded to Sage 300 2021 because our macros wouldn't run. I thought they had either been recompiled or maybe re-saved?  Have you heard of a Sage 300 upgrade breaking macros before?

    We still have Excel 32-bit on all five Sage 300 machines: the four that don't work and the one that does. 

  • 0 in reply to Scott @ Equation

    Thank you.  I'm not familiar with how to edit macros.  Do you do that within Sage 300 or Excel?  or something else?

  • 0 in reply to jwckauman

    You can edit the macro by selecting the Edit button from the Macro grouping of icons on the main Sage screen. 

    When the macro editor opens, go to Tools, References... If References is disabled then the macro has a password on it and you should contact your vendor.

    On the References screen, look to see if any of the entries at the top of the list have the word "missing" next to any of them. You don't need to go down the list past the items that are checked. It's a long list and the relevant items on the list are moved to the top.

    If there are items with "missing" next to them, then the next step is to resolve that.

    You haven't indicated if your macro contains a Sage screen within it. If that's the case then that's why after each upgrade to Sage you need to update the macro. You can also be affected if you install a product update for your existing version.

    Anti-virus software will sometimes flag a macro or files that a macro needs to run as problematic. Sometimes for a valid reason, sometimes it's a false positive. If you have the option, you can try to disable your anti-virus for a few moments and try to run the macro.

  • 0 in reply to Django

    Thank you!  I wasn't able to get the macro to open in VBA. I did some searching online and found a post about VBA either missing or being the wrong version/architecture.  The post included a download of the VBA 7.1 x86 installer.   I downloaded and installed VBA 7.1 x86 and now the macro opens and runs successfully.  

    We are running Office 2019 x86 so. Any idea why I needed to install VBA 7.1 x86? I thought VBA came with Office and matched the version/architecture.   

  • 0 in reply to jwckauman

    It's a common problem, Office doesn't always install VBA.  And we do Office repairs regularly when there's an auto-update over the weekend and it breaks Sage Intelligence.

  • 0 in reply to Jay Converse Acumen

    Thanks.  Is there a specific option you have to select when installing Office 2019 from scratch? We use an Office Configuration File (.xml) when we install Office 2019. It includes which apps get installed (e.g Word, Excel) and which apps are excluded (e.g. Access). Also includes whether to install the x86 or x64 version,  the product key, etc.  I don't remember VBA being a choice but plan to go back and look.