Results 1 to 8 of 8

Thread: running another program

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Jul 2001
    Posts
    67

    Smile running another program

    Hi. I am wondering how you run other programs from visual basic, for example, i want to run notepad (c:\windows\notepad.exe i think) when you hit a button.

  2. #2
    Frenzied Member jjortiz's Avatar
    Join Date
    Mar 2001
    Location
    NYC
    Posts
    1,768
    Use the shell function.
    VB Code:
    1. Shell "c:\windows\notepad.exe", vbNormalFocus

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Jul 2001
    Posts
    67
    thanks man!

  4. #4
    Frenzied Member jjortiz's Avatar
    Join Date
    Mar 2001
    Location
    NYC
    Posts
    1,768
    No Problem.

  5. #5

    Thread Starter
    Lively Member
    Join Date
    Jul 2001
    Posts
    67
    actually.. now how would i oepn a file other than a exe? such as a text file

  6. #6
    Frenzied Member jjortiz's Avatar
    Join Date
    Mar 2001
    Location
    NYC
    Posts
    1,768
    Here is a good place to start. It will give you more detailed information. This is the way lot's of programmers like to do it. I prefer to use the File System Object.

  7. #7

    Thread Starter
    Lively Member
    Join Date
    Jul 2001
    Posts
    67
    where is a good place to start?

  8. #8
    Frenzied Member jjortiz's Avatar
    Join Date
    Mar 2001
    Location
    NYC
    Posts
    1,768
    Sorry i always do that. Here
    http://www.vbworld.com/files/openstatement/

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