VBA Code to Handle a Modal Window in SOLIDWORKS

I’m looking for a VBA script that uses Windows API that can suppress a model window inside of SOLIDWORKS (By sending keys).

Useful scenario:

  • an API call that opens a modal window
  • The VBA execution stops until the user interacts with the window
  • This is where the code comes in to suppress the window so the execution continues

Is the code shared on this page helpful? It mentions dismissing dialog boxes for various other software packages. https://thebuildingcoder.typepad.com/blog/2009/10/dismiss-dialogue-using-windows-api.html