Start --> Run --> in vba

Posted on 2004-11-15
Last Modified: 2008-03-10
I can go to Start --> Run --> and put in 'sas ""' and it runs in batch mode for me.

How can I do this in vba code?

Question by:scorp8
    LVL 14

    Expert Comment

    Shell ("C:\")
    LVL 48

    Accepted Solution

    Try create a .vbs file.

    1. open notepad, enter the below script:

    Dim WSH
    AppToRun = "sas"
    Set WSH = WScript.CreateObject("WScript.Shell")
    WSH.Run AppToRun

    same it as c:\test.vbs

    2. run it from Start > Run , type c:\test.vbs

    3. your program runs now!

    Hope this helps
    LVL 48

    Expert Comment

    by:Ryan Chong
    >>same it as c:\test.vbs
    oops, typo >> save it as c:\test.vbs
    LVL 1

    Author Comment

    perfect ryancys...  thanks....

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    Regardless of which version on MS Access you are using, one of the harder data-entry forms to create is one where most data from previous entries needs to be appended to new records, especially when there are numerous fields and records involved.  W…
    I see at least one EE question a week that pertains to using temporary tables in MS Access.  But surprisingly, I was unable to find a single article devoted solely to this topic. I don’t intend to describe all of the uses of temporary tables in t…
    Basics of query design. Shows you how to construct a simple query by adding tables, perform joins, defining output columns, perform sorting, and apply criteria.
    Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…

    761 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

    15 Experts available now in Live!

    Get 1:1 Help Now