+ Reply to Thread
Results 1 to 4 of 4

VBA Changing a fixed file path with open file dialog box

  1. #1
    Forum Contributor
    Join Date
    02-14-2008
    Location
    Manchester, England
    MS-Off Ver
    2007
    Posts
    110

    VBA Changing a fixed file path with open file dialog box

    Hello

    Hoping someone might be able to help. I've recorded a macro in excel to import a text file. After a bit of tinkering with the code all works well. The only thing is now it imports the same txt file every time. I'd like to be able to be prompted for the file location before the rest of the macro runs rather than altering the code each time. I've popped my code in below if it helps.

    Thanks

    Dan

    Please Login or Register  to view this content.
    Last edited by Dan27; 03-23-2011 at 07:52 AM.

  2. #2
    Valued Forum Contributor
    Join Date
    06-19-2010
    Location
    Holywell, N Wales, UK
    MS-Off Ver
    Excel 2013
    Posts
    470

    Re: VBA Changing a fixed file path with open file dialog box

    Dan
    Does this help

    Please Login or Register  to view this content.
    where sFName is a string variable to plug into your code

    barry
    Last edited by barryleajo; 03-18-2011 at 01:27 PM. Reason: Forgot the code tags

  3. #3
    Registered User
    Join Date
    10-17-2011
    Location
    Lillestrom
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: VBA Changing a fixed file path with open file dialog box

    This thread is not Solved!

  4. #4
    Forum Expert
    Join Date
    12-23-2006
    Location
    germany
    MS-Off Ver
    XL2003 / 2007 / 2010
    Posts
    6,326

    Re: VBA Changing a fixed file path with open file dialog box

    Your point being?

+ 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