One of the first pieces of VBA code I intended to write in Excel 2013 involved using a
Scripting.Dictionary object. Unfortunately, subsequent to the Office 2013 installation, if I tried to create any object from the scrrun.dll library I got this runtime error:
-2147024703 (800700c1) Automation Error %1 is not a valid Win32 application.
The first thing I tried to do to fix this problem was re-register scrrun.dll. My desktop is running on Win7 32-bit so this file is located under C:\Windows\System32. When I tried to re-register the dll I (eventually) noticed that I wasn’t getting the usual “success” or “error” message box: the command was just silently executing (and failing) even though I wasn’t including the
/s silent switch. For more information on Regsvr32.exe usage and error messages have a look here.
After fiddling around for a little while I:
Renamed scrrun.dll to scrrun.dll.bak
Copied scrrun.dll from my laptop into my desktop’s System32 folder
Ran cmd.exe as administrator and registered the copied file using the command:
And now all is well again in the world of Microsoft Scripting Runtime.