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