Has Excel stopped working with visacomlib.dll (Oct 2021)

Occasional Visitor

Hello,

 

I use Excel and Word to interface to lab test equipment (oscilloscope) using visacomlib DLL from Agilent/Keysight and VBA.

Recently (Oct 2021) Excel is crashing when I try to connect the scope (or any equipment on my GPIB bus).

    Set SCOPE1.Command.IO = io_mgr.Open("GPIB:: 12")

My code is ok as it has always worked before.

Similar code in Word is working fine --> hardware interface and VISA drivers are ok.

 

Looking at the bus data using Agilent Connection Expert IO Monitor I can see the the connection to the equipment is being made but Excel crashes - monitor file attached.

 

Has Excel been changed recently that affect external DLLs?

 

Thanks,

 

D.

2 Replies

@DD_Heyday 

 

I'm a support engineer at Keysight for the IO Libraries Suite software and do see this crash occurring in MS Excel and VBA as well after our IT team push out a MS Office update on Nov 17th 2021.

I recorded a video of going through the VBA program that uses VISA-COM Library in Debug mode and the loading of the library, initialization of the Resource Manager, opening the instrument session, executing SCPI commands and closing of the instrument session and Resource Manager actually work as expected.

It is when the VBA exits the subroutine and where I assume it Garbage Collects any objects and returns back to the spread sheet is where the crash occurs.

 

I also posted this issue in another Microsoft forum: https://docs.microsoft.com/en-us/answers/questions/613052/simple-visual-basic-application-crashes-ex... 

 

Here's the video: https://drive.google.com/file/d/1sCGzJfUkPqP2mRLrpPeIQQPCdPZeDfC_/view?usp=sharing 

 @DD_Heyday 

 

  1. Managed to resolve the issue by uninstalling MS Office 365 the second time around from Programs and Features.

  2. Going to my companies IT provided MS Office 365 portal (URL was something portal.office.com and logged in with my work email).

  3. Clicking on the Install Office button and downloading a OfficeSetup.exe

  4. Running the .exe to reinstall MS Office 365 applications with Administrator privileges

  5. Reboot

  6. Launch my Excel program with the VBA code referencing VISA-COM Library 5.12 and ran it without the crash anymore.

So the bug looks to be happening when the MS Office 365 was updated and it basically breaks the Exit Sub process when objects in the VBA program are supposed to be Garbage Collected.