+ Reply to Thread
Results 1 to 4 of 4

Open file based on user selection

  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\"?
    Please Login or Register  to view this content.
    Thanks in advance for any help you can offer.

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

  2. #2
    Valued Forum Contributor
    Join Date
    03-23-2008
    Location
    Tennessee
    MS-Off Ver
    Office 2007
    Posts
    706
    Found it! I just needed to add the ChDir line before the GetOpenFilename. Here's the code that worked:
    Please Login or Register  to view this content.
    Have a good one.

  3. #3
    Valued Forum Contributor
    Join Date
    03-23-2008
    Location
    Tennessee
    MS-Off Ver
    Office 2007
    Posts
    706
    Okay, I was wrong. This isn't solved.

    Adding the ChDir line worked on my computer, but for some reason when I runt he macro on another computer, it still defaults to the My Computer directory when the select file dialog opens up. Is there another line I need to add, or what?

  4. #4
    Valued Forum Contributor
    Join Date
    03-23-2008
    Location
    Tennessee
    MS-Off Ver
    Office 2007
    Posts
    706
    This worked on the other computer:
    Please Login or Register  to view this content.

+ Reply to Thread

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