[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2301
  • Last Modified:

enable Microsoft Scripting Runtime library

I created an excel vba project that uses a number of scripting objects.  In trying to load into a corporate environment it errors at the point where it calls the object.  Can I write vba code that will enable this and/or is it likely to be prohibited by the security protocols of this corporation.  Macros run fine.
2 Solutions
assuming that all the machines have the scrrun.dll accessible, you can try this to ensure that it loads:

sub ...
Dim fso As Object 'scripting.filesystemobject
Set fso = CreateObject("scripting.filesystemobject")
Set fso=Nothing
end sub
Michael FowlerSolutions ConsultantCommented:
It is possible that this library is either not on the corporate environment or not in the reference list.

You could try opening the macro in the corporate environment and checking the references. If it is not listed try looking for it in C:\Windows\System subfolder as Scrrun.dll

davidamAuthor Commented:
very complete answers

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now