Results 1 to 2 of 2

Thread: shell

  1. #1
    Guest

    Post

    I'm having trouble opening a Notepad file with Shell.
    I can open Notepad itself (no problem) with:

    RetVal = shell("c:\windows\notepad.exe",1)

    but when I add a switch ("/ FileName.txt") I get an error: "can't find file"

    When I try the same syntax in Run in Start Menu, it opens the file directly.

    Any suggestions?

    Thanks.

  2. #2
    Guru Aaron Young's Avatar
    Join Date
    Jun 1999
    Location
    Red Wing, MN, USA
    Posts
    2,177

    Post

    Try without the Switch, ie.

    Shell "Notepad.exe C:\Files\File.txt", vbNormalFocus

    ------------------
    Aaron Young
    Analyst Programmer
    [email protected]
    [email protected]


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