Results 1 to 3 of 3

Thread: running an executable from VB

  1. #1

    Thread Starter
    Member
    Join Date
    Jan 2002
    Posts
    44

    running an executable from VB

    During the execution of my vb program I would like to run an executable that I have on my C drive. What code can I use to cause the VB program to run a seperate executable stored under the name DoSomething.exe

    thanks

  2. #2
    Banished Cander's Avatar
    Join Date
    Dec 2000
    Location
    Why do you care?
    Posts
    6,913
    shell "c:\dosomething.exe"
    Stack Overflow
    See the features of Visual Studio 2010 and C# 4.0: The 10-4 show on Channel9

  3. #3
    Be sure to put that in an error catching block:
    VB Code:
    1. On Error Goto Nooooooooooooo
    2. Shell "c:\dostuffdarnit.exe", vbNormalFocus
    3. Exit Sub ' or Exit Function
    4.  
    5. Nooooooooooooo:
    6. Msgbox "NEXT TIME RUN A PROGRAM THAT EXISTS, YOU DUMMY!"

Posting Permissions

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



Click Here to Expand Forum to Full Width