Error Checking in Excel
Thanks Thanks:  0
Likes Likes:  0
Results 1 to 4 of 4

Thread: STUCK - Need to get a dos prompt

  1. #1
    New Member
    Join Date
    Apr 2002
    Location
    athens
    Posts
    15
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    HI hope you guys can help

    i need to run a dos command in my vba script
    Is it possible???
    ie : run a file transfer from a as 400 machine wich is already done

    Ps if you guys want a real laugh you must have a look at my vba stuff i use indicators and stuff (from RPG) but hey it works

  2. #2
    MrExcel MVP Ivan F Moala's Avatar
    Join Date
    Feb 2002
    Location
    Auckland, New Zealand
    Posts
    4,209
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    On 2002-04-29 01:42, grovithis wrote:
    HI hope you guys can help

    i need to run a dos command in my vba script
    Is it possible???
    ie : run a file transfer from a as 400 machine wich is already done

    Ps if you guys want a real laugh you must have a look at my vba stuff i use indicators and stuff (from RPG) but hey it works
    Any help ??


    Sub Run_dos()

    Shell "C:command.com", vbNormalFocus

    End Sub


    Kind Regards,
    Ivan F Moala From the City of Sails

  3. #3
    New Member
    Join Date
    Apr 2002
    Location
    athens
    Posts
    15
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Thanks a lot Ivan

    Saved my but
    now all i have to do is figure out how to
    write (ie type in the words in dos)

    if you have any ideas great will really
    appreciate it


  4. #4
    New Member
    Join Date
    Apr 2002
    Location
    athens
    Posts
    15
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    I think i got it

    instead of calling the command .com just tell
    vb to run a .bat filr

    eg
    Sub Run _bat()

    Shell "C:test.bat", vbNormalFocus

    End Sub
    again thanks a lot Ivan

Some videos you may like

User Tag List

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

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