+ Reply to Thread
Results 1 to 2 of 2

Open and paste a .txt file to a pre-defined table

  1. #1
    Registered User
    Join Date
    01-25-2009
    Location
    Geneva, Indiana
    MS-Off Ver
    Excel 2007
    Posts
    1

    Open and paste a .txt file to a pre-defined table

    Hi all,

    1. I have a pre-formatted spreadsheet. Would it be possible using a macro to open a text file (note I have files for everyday of the month) to a pre-defined table in a spreadsheet.

    This macro would be taking place of selecting my table and using Get External Data> Import Text File.

    This needs to be connected to a command button that is located on the spreadsheet.

    2. I have a command button that clears all the data from the pre-defined data table.

    3. This is to simplify everything for my employees (about 6) to be able to view data but to be able to look at certian variable that are in formulas like averages and simple addition to determine data from that day.

    I can also supply a copy of my spreadsheet and a couple days of data if it will help.



    Also here is what I have for code on it right now.
    Please Login or Register  to view this content.
    Where Im not sure where to go is how to take the file I opened from the dialog and paste it to my table.

    I have included my template, 3 days of data and 2 macros

    If anyone can help Thanks



    Tim
    Attached Files Attached Files
    Last edited by Leith Ross; 01-25-2009 at 11:39 PM.

  2. #2
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,437

    Re: Open and paste a .txt file to a pre-defined table

    Try this. It requires your template to be in the same folder as the workbook.

    Please Login or Register  to view this content.
    Attached Files Attached Files
    Cheers
    Andy
    www.andypope.info

+ 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