+ Reply to Thread
Results 1 to 5 of 5

Prompt user to select file to import

  1. #1
    Registered User
    Join Date
    08-24-2006
    Location
    Maryland
    Posts
    50

    Prompt user to select file to import

    Good Afternoon,

    I'm trying to create a macro (piece by piece) to enable my most novice excel user to accomplish a fairly advanced task. (Basically, I'd like all of the more complex tasks done behind the scenes with this macro).

    The next step in my quest is prompt the user to select a file from a specific file location. I recorded myself going through the motions, but my code obviously specifies a specific file name......but the file name will vary from day today.

    For example, my code below references a file name called "ARS Deposits - 101609.txt".....but tomorrow's might use a different date.

    Can I insert an interactive menu/box that will "stop" the macro and allow the user to manually select which file to import? Does this make sense?

    Here is my code (the section I'm referring to is colored red):

    Please Login or Register  to view this content.

  2. #2
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Prompt user to select file to import

    Maybe like this:
    Please Login or Register  to view this content.
    Entia non sunt multiplicanda sine necessitate

  3. #3
    Registered User
    Join Date
    08-24-2006
    Location
    Maryland
    Posts
    50

    Re: Prompt user to select file to import

    Where would I paste the code?

  4. #4
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Prompt user to select file to import

    The code he's provided is to replace the TOP of your existing macro. His code goes through the "Destination" line...so replace the top of your macro down through that line...leave the rest of your code...
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  5. #5
    Registered User
    Join Date
    08-24-2006
    Location
    Maryland
    Posts
    50

    Re: Prompt user to select file to import

    I think I understand. I confused myself because I'm using a different machine now...ugggh

    I'm going to play around with it. I appreciate your help and patience

+ 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