+ Reply to Thread
Results 1 to 3 of 3

Import Data from variable Text files into Excel

  1. #1
    Forum Contributor
    Join Date
    07-21-2009
    Location
    Sheffield, England
    MS-Off Ver
    Excel 2010
    Posts
    117

    Import Data from variable Text files into Excel

    Dear All,

    I have a sheet which I would like to use to import a text file. However I want that text file to be a variable.

    The path to the file will always be the same but the files in the specified directory will change.

    The path is “C:\HELPDESK\INCIDENTS\PLUGINS\”

    The text files will be numbered. E.g. “1.txt” “2.txt” “3.txt” etc.

    Can I use Visual Basic where a user can click a “Get ticket information” Button which will popup asking for the ticket number (e.g. “1”) and then import the text file:

    E.g.

    “C:\HELPDESK\INCIDENTS\PLUGINS\1.txt” into the sheet

    Can anyone help?

    If it is possible, could it import two text files into the same sheet – There is a ticket history text file also with filenames like “History_1.txt” “History_2.txt” within the same directory. If it could import the two that would be awesome!!!

  2. #2
    Forum Contributor
    Join Date
    07-21-2009
    Location
    Sheffield, England
    MS-Off Ver
    Excel 2010
    Posts
    117

    Re: Import Data from variable Text files into Excel

    Hello again,

    I've compiles this using record macro - however, how can I fit my variable (fname) into the data path?

    Please Login or Register  to view this content.

  3. #3
    Forum Contributor
    Join Date
    07-21-2009
    Location
    Sheffield, England
    MS-Off Ver
    Excel 2010
    Posts
    117

    Re: Import Data from variable Text files into Excel

    No worries, I've sorted it now!!

+ 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