+ Reply to Thread
Results 1 to 4 of 4

Need macro that opens .txt file in excel, run macros and save file in batch

  1. #1
    Registered User
    Join Date
    11-04-2014
    Location
    India
    MS-Off Ver
    2010
    Posts
    11

    Need macro that opens .txt file in excel, run macros and save file in batch

    I have .txt files in folder, I need a macro that opens .txt file in excel, run 2 macros and save file in different location
    and continue the process till all files are completed.
    All txt files are name as numbers in sequence e.g ( 1.txt, 2.txt........ n.txt)

    Kindly do the needful.

  2. #2
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: Need macro that opens .txt file in excel, run macros and save file in batch

    Hello khalidness,

    Try this. You need to make a few changes to the code before you run it. The parts to change are in blue.
    Please Login or Register  to view this content.
    Last edited by Leith Ross; 11-08-2014 at 03:01 PM. Reason: Corrected Spelling and Macro References
    Sincerely,
    Leith Ross

    Remember To Do the Following....

    1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.
    2. Thank those who have helped you by clicking the Star below the post.
    3. Please mark your post [SOLVED] if it has been answered satisfactorily.


    Old Scottish Proverb...
    Luathaid gu deanamh maille! (Rushing causes delays!)

  3. #3
    Registered User
    Join Date
    11-04-2014
    Location
    India
    MS-Off Ver
    2010
    Posts
    11

    Re: Need macro that opens .txt file in excel, run macros and save file in batch

    Hi Leith Ross

    When we executed the Macro we are getting 1004 error

    .txt file could not be found , we also tried to OpenText Method but we were not successful

    Kindly do the needful

  4. #4
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: Need macro that opens .txt file in excel, run macros and save file in batch

    Hello khalidness,

    From your description of the problem, your file does not have a txt extension.

    What is your file's extension?

+ 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. Hidden Excel File opens when running Macros
    By mp4-4 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-22-2013, 12:45 PM
  2. Batch file & macro to copy the latest file from a folder
    By paidlukkha in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 04-19-2013, 03:05 PM
  3. DOS BATCH file to open excel and run macros
    By dwr0211 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-08-2011, 02:13 PM
  4. [SOLVED] save excel file from a table delimited file (.txt) using macros
    By sedamfo in forum Excel - New Users/Basics
    Replies: 1
    Last Post: 02-15-2005, 01:06 AM
  5. Replies: 3
    Last Post: 02-09-2005, 08:06 PM

Tags for this Thread

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