+ Reply to Thread
Results 1 to 3 of 3

Insert imported filename from text file

  1. #1
    Registered User
    Join Date
    11-06-2014
    Location
    Kent, England
    MS-Off Ver
    Office 2013
    Posts
    3

    Insert imported filename from text file

    I have some copied code which imports a text file (nice and simple) but what I would like is for it to return the filename thats been imported either at the top or in the next column. The filename will always be different and I need to do other things with the file afterwards so need a record of it for other macros to pick up the file and move it about or delete it.
    I tried using the GetFile in a cell value but then it opens up the dialog box again in order to return the value.

    Any help would be greatly appreciated.

    Please Login or Register  to view this content.

  2. #2
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,834

    Re: Insert imported filename from text file

    1) Add in Dim Statemant,
    Please Login or Register  to view this content.
    2) Add one line and change
    Please Login or Register  to view this content.
    3) add one line
    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    11-06-2014
    Location
    Kent, England
    MS-Off Ver
    Office 2013
    Posts
    3

    Re: Insert imported filename from text file

    Brilliant thank you!

+ 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. Refreshing an imported text file
    By j_Southern in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 01-16-2017, 09:51 AM
  2. Get filename of imported XML file
    By skrz in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-30-2015, 06:03 AM
  3. Extract filename from imported CSV file
    By p.j.p87 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-28-2013, 11:07 AM
  4. How to Clean an Imported Text file with VBA
    By zaska in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 03-17-2013, 07:07 AM
  5. add imported text file name above imported data
    By tompie in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-27-2009, 08:18 AM
  6. [SOLVED] Insert text into filename
    By davegb in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-05-2005, 03:05 PM
  7. [SOLVED] can I display the file name of the imported text file in another c
    By John-G in forum Excel General
    Replies: 0
    Last Post: 05-13-2005, 01:06 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