Results 1 to 2 of 2
  1. #1
    Join Date
    Jan 2004
    Toronto, Canada

    Unanswered: ShellExecute "Explorer.exe"

    Hi, i put a button in one of my forms to open up a link to a folder;
    Its a Shell Execute function;

    Private Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" _
    (ByVal hWnd As Long, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, _
    ByVal lpDirectory As String, ByVal lpShowCmd As Long) As Long

    Private Const SW_NORMAL = 1

    Private Sub Command151_Click()

    ShellExecute Me.hWnd, "Open", "explorer.exe", "/e, \", "Q:\Patents", SW_NORMAL
    End Sub

    Unfortunately, it only opens up Q:\ and doesn't go into Patents folder. I have tried everthing, and it doesn't work. I tried "Q:\Patents\" too

  2. #2
    Join Date
    Nov 2003
    This'll do the trick for ya.....

    ShellExecute Me.hWnd, "Open", "explorer.exe", "/e, Q:\Patents", "Q", SW_NORMAL

Posting Permissions

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