none
Open file location (file select in Windows Explorer)

    Question

  • My VB program has an "Open file location" button. When this is clicked, it will open the folder where the selected file is located. How can I also programatically make it select the file in Windows Explorer so the user doesn't have to scroll down and find it? I haven't found it in the list of command-line arguments that System.Diagnostics.Process.Start asks for, so how is it done?

    Bgeo99


    • Edited by Bgeo25 Friday, November 02, 2012 9:01 PM
    Friday, November 02, 2012 8:59 PM

Answers

  • Try this:

    Shell("explorer /select," & fileToFind, AppWinStyle.NormalFocus)


    ...where "fileToFind" is the full path of the file.

    Please call me Frank :)

    • Marked as answer by Bgeo25 Friday, November 02, 2012 9:29 PM
    Friday, November 02, 2012 9:03 PM

All replies