+ Reply to Thread
Results 1 to 2 of 2

Command Prompt through Excel

Hybrid View

  1. #1
    Forum Contributor
    Join Date
    08-27-2009
    Location
    South Africa
    MS-Off Ver
    Office 2010
    Posts
    217

    Question Command Prompt through Excel

    Good Morning

    I am trying to run a command through excel, I managed the command shell to open and access the correct directory but don't know how to add the .exe file it should run with param. Code I have is-

    Private Sub CommandButton4_Click()
    
    Shell "cmd.exe /k cd C:\Program Files (x86)\A App Folder", vbNormalFocus
    
    End Sub
    I need to add
    app.exe /A C:\Test\1100.pdf
    Thanks

  2. #2
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: Command Prompt through Excel

    perhaps
    Shell "cmd.exe /k ""C:\Program Files (x86)\A App Folder\app.exe /A C:\Test\1100.pdf""", vbNormalFocus
    Josie

    if at first you don't succeed try doing it the way your wife told you to

+ 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