Running Wscript Code in a VB6 program

Posted on 2006-04-06
Last Modified: 2010-05-01
I need to run vbscript code within a visual basic 6 program. I know the actual code types arent compatible. Is there a way to do this or to interpet the code as wscript?
Question by:Jm2005
    LVL 13

    Accepted Solution


    Take a look at this:
    LVL 28

    Expert Comment

    In VB6 you can add a reference to Microsoft Scripting Runtime Under the Project > references Menu.
    LVL 85

    Expert Comment

    by:Mike Tomlinson
    You should be able to run just about any VBScript code in a VB6 app with little or no modifications...

    Some things such as echoing back to a command prompt require more work but it's still possible.

    What does your VBScript do?

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    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

    Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
    This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
    Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
    This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

    759 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

    11 Experts available now in Live!

    Get 1:1 Help Now