+ Reply to Thread
Results 1 to 2 of 2

manipulating text files before importing

  1. #1
    Registered User
    Join Date
    04-19-2008
    Posts
    1

    manipulating text files before importing

    I have a two tab workbook, one is a form (sheet 1) one is my import sheet (sheet 2). The import sheet (sheet 2) has cells linked to the form (sheet 1)that fill the appropriate cells when a text file is imported to sheet 2. My problem is that through operator input the text file I import onto sheet 2 sometimes will have an extra line of text in the file and throws off my links. So my question is, is it possible to write a vb procedure that can find a specific line in a text file then delete it before it is dumped to its import destination with out changing the original text file. All I'm experianced with is macro recording and very basic vb. Any help would be appreciated.


    jvrodz

  2. #2
    Valued Forum Contributor mudraker's Avatar
    Join Date
    11-10-2003
    Location
    Melbourne, Australia
    Posts
    3,983
    A macro can open, modify, create, save, delete text files without 1st importing the file into Excel.

    Once a text file s opened the macro could be used to place data from the file into Excel without having to modify the file, save it and the import into Excel


    You would need to give more details about the text file or better is to attach a copy of the text file & workbook & male sure you explain what line in the text file is causing the problem
    Please Read Forum Rules Before Posting
    Wrap VBA code by selecting the code and clicking the # icon or Read This
    How To Cross Post politely

    Top Excel links for beginners to Experts

    If you are pleased with a member's answer then use the Scales icon to rate it
    If my reply has assisted or failed to assist you I welcome your Feedback.

+ 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