+ Reply to Thread
Results 1 to 3 of 3

MACRO: Store name of selected file as string w/ import data file dialog box

  1. #1
    Registered User
    Join Date
    09-11-2013
    Location
    Montreal, Qc, Canada
    MS-Off Ver
    Excel 2013
    Posts
    41

    MACRO: Store name of selected file as string w/ import data file dialog box

    In a macro, when replacing an existing array of data with an external source, as selected by the user in the import data dialog box, I use this:

    Please Login or Register  to view this content.
    This works just fine, but I would like to store the name of the selected file as a string (NameofFile), as selected by the user when prompt.
    Anyone?

    Annie

  2. #2
    Registered User
    Join Date
    09-11-2013
    Location
    Montreal, Qc, Canada
    MS-Off Ver
    Excel 2013
    Posts
    41

    Re: MACRO: Store name of selected file as string w/ import data file dialog box

    Would I be on the right track if I supposed that NameofFile should be As Variant and would also include the complete path? (If so, it would be great since I also need the path the user set...)

  3. #3
    Registered User
    Join Date
    09-11-2013
    Location
    Montreal, Qc, Canada
    MS-Off Ver
    Excel 2013
    Posts
    41

    Re: MACRO: Store name of selected file as string w/ import data file dialog box

    Got it all by myself!
    Was rather simple:

    Please Login or Register  to view this content.
    Still gotta find the path, though!

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Import xml data by letting the user choose from file dialog box
    By victor.enbom in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 12-19-2012, 03:13 AM
  2. [SOLVED] Macro - Master file to import data from another open file with variable file name
    By jdodz in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 12-10-2012, 10:56 PM
  3. Import data from selected excel file into a specified worksheet
    By Shogun in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 02-15-2012, 10:45 AM
  4. Macro to import selected data from a master data file
    By HalaK in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-07-2010, 09:14 AM
  5. import data from .txt file selected by user
    By ahartman in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 02-29-2008, 03:34 AM

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