Results 1 to 6 of 6
  1. #1
    Join Date
    Jul 2004
    Posts
    23

    Unanswered: Form button to activate Windows Explorer..

    Hi,

    I want to click on a form's button to open Windows Explorer default at this path to show all the Excel files, but it doesn't work. G:\ is a shared network drive.

    G:\Planning\REPORTS DATA\Service Level data\Raw Data\2004\*.xls

    Can somebody please give a hand ?
    Thanks in advance.



    Private Sub ExplorerDefaultPath_Click()

    Shell "explorer.exe ""G:\Planning\REPORTS DATA\Service Level data\Raw Data\2004\*.xls""", vbNormalFocus

    End Sub

  2. #2
    Join Date
    Mar 2004
    Location
    belgium
    Posts
    290
    Shell "explorer.exe ""G:\Planning\REPORTS DATA\Service Level data\Raw Data\2004\*.xls""", vbNormalFocus

    i tried this :

    Shell "C:\windows\explorer.exe C:\DATA\EXCELL\PRIVE ", vbNormalFocus

    this gives me the total map,

    Shell "C:\windows\explorer.exe C:\DATA\EXCELL\PRIVE\*.xls ", vbNormalFocus

    I get an error, *.xls will determind as a map, not as the required files with xls-extinction.

  3. #3
    Join Date
    Jul 2004
    Posts
    23

    MsgBox to open up in Foreground and close button to exit Explorer

    Hi,

    The Explorer opened successfully at its designated path.
    How can I have a MsgBox pops up in the foreground to read as "click OK to close the Explorer". When the users click at the "OK" button it will close the Explorer.

    How can I do this ?
    Thanks.

  4. #4
    Join Date
    Oct 2003
    Location
    Ger
    Posts
    1,969
    Provided Answers: 1
    You can use the SendKeys "%{F4}", True to close the any window

  5. #5
    Join Date
    Jul 2004
    Posts
    23
    Hi,

    SendKeys "%{F4}", True

    I use this key it closes my mdb but not my Windows Explorer.
    Any idea ?

  6. #6
    Join Date
    Oct 2003
    Location
    Ger
    Posts
    1,969
    Provided Answers: 1
    You have to set the focus on the windwo which you want t close at first , then use the SendKeys

Posting Permissions

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