+ Reply to Thread
Results 1 to 5 of 5

Problems using 'Shell' command

Hybrid View

  1. #1
    Registered User
    Join Date
    04-18-2011
    Location
    Leeds
    MS-Off Ver
    Excel 2010
    Posts
    20

    Problems using 'Shell' command

    Hi,

    I am trying to run a dos based program via the shell command but I can't get it to open correctly. The open file command works fine but when the program opens, the screen is black compared to what it should be, it usually appears blue and asks for your username.

    Also on the taskbar the title for the program appears as COM2 where as usually it has an IP address.

    The code I am using is.

    Dim ReqApp
    ReqApp = Shell("C:\emuwin\pyramid.exe", 1)

  2. #2
    Registered User
    Join Date
    04-18-2011
    Location
    Leeds
    MS-Off Ver
    Excel 2010
    Posts
    20

    Re: Problems using 'Shell' command

    Any suggestions?

  3. #3
    Forum Expert
    Join Date
    07-16-2010
    Location
    Northumberland, UK
    MS-Off Ver
    Excel 2007 (home), Excel 2010 (work)
    Posts
    3,054

    Re: Problems using 'Shell' command

    Is it a DOS or a Windows programme that you're trying to run?

  4. #4
    Forum Contributor
    Join Date
    01-20-2012
    Location
    Amsterdam, The Netherlands
    MS-Off Ver
    Excel 2010
    Posts
    186

    Re: Problems using 'Shell' command

    Code looks valid, how do you normally start it?

  5. #5
    Registered User
    Join Date
    05-05-2012
    Location
    india
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: Problems using 'Shell' command

    just copy and past this code.

    Option Explicit
    Dim objshell
    Set objshell = CreateObject("wscript.shell")
    Call Shell("cmd.exe")
    objshell.AppActivate ("cmd.exe")

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1