enable Microsoft Scripting Runtime library

Posted on 2011-04-28
Last Modified: 2012-06-27
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.
Question by:davidam
    LVL 22

    Accepted Solution

    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
    LVL 23

    Assisted Solution

    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


    Author Closing Comment

    very complete answers

    Featured Post

    How your wiki can always stay up-to-date

    Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
    - Increase transparency
    - Onboard new hires faster
    - Access from mobile/offline

    Join & Write a Comment

    Suggested Solutions

    Title # Comments Views Activity
    excel forecast function 1 28
    Using "ScreenUpdating" 6 36
    Surpressing messages VBA 9 33
    Check version 13 46
    Workbook link problems after copying tabs to a new workbook? David Miller (dlmille) Intro Have you either copied sheets to a new workbook, and after having saved and opened that workbook, you find that there are links back to the original sou…
    Outlook Free & Paid Tools
    This Micro Tutorial demonstrate the bugs in Microsoft Excel for Mac with Pivot Charts.
    Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

    754 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    21 Experts available now in Live!

    Get 1:1 Help Now