Results 1 to 4 of 4

Open file based on user selection

Threaded View

  1. #1
    Valued Forum Contributor
    Join Date
    03-23-2008
    Location
    Tennessee
    MS-Off Ver
    Office 2007
    Posts
    706

    Open file based on user selection

    Greetings, Gurus.

    A search of the forum gave me most of the code I need, I just need some help with modification. The code below opens a window which allows the user to select a file to open. Apparently, it starts in the directory of the file containing the macro. How would I modify this to open in "M:\Archived PO Responses\Processed\"?
        On Error GoTo NoPO
        NewFN = Application.GetOpenFilename(FileFilter:="Excel Files (*.xls), *.xls", Title:="Please select a file")
        If NewFN = False Then
        'They pressed Cancel
        MsgBox "Stopping because you did not select a file"
        Exit Sub
        Else
        Workbooks.Open Filename:=NewFN
        End If
        On Error GoTo 0
    Thanks in advance for any help you can offer.

    Hutch
    Last edited by hutch@edge.net; 10-23-2008 at 11:23 AM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1