+ Reply to Thread
Results 1 to 2 of 2

filename contained in a cell to import data

Hybrid View

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

    Question filename contained in a cell to import data

    I am writting a macro in order to import data from a .txt file, but the source file name changes according to the user, and the name is contained in a cell (lets use A1)

    So far, I know the code line needed to be used to open the file, but I just need to adapt it so the file name is the cell content.

    So in this line:

            .Connection = _
            "TEXT;S:(PATH)\log_20130627_112848 .txt"
    PHP Code: 
    log_20130627_112848 .txt 
    need to be modified to use the content of a cell. I know it should be easy, but since I haven't used macros in years, I am at a loss right now...:P

    Thanks!

  2. #2
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: filename contained in a cell to import data

    Is this solved?

    If you solve a problem yourself before anyone else has responded, please take a moment to describe your solution, chances are some other member will benefit.
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

+ 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. [SOLVED] Trying to import filename based on cell contents
    By JesusOnEez in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 06-28-2013, 10:11 AM
  2. import picture in specific cell if filename = cellnumber
    By Armitage2k in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-13-2009, 01:35 PM
  3. Macro to Open the Menu Data,Refresh Data,filename,import
    By Bob in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-11-2006, 12:55 PM
  4. Replies: 0
    Last Post: 01-05-2006, 09:45 AM
  5. Vlookup for data contained in a cell
    By Garbunkel in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 09-14-2005, 03:05 PM

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