+ Reply to Thread
Results 1 to 2 of 2

Run Time Error 1004 (VBA Code)

  1. #1
    Registered User
    Join Date
    07-21-2015
    Location
    manila
    MS-Off Ver
    MS Office 2010
    Posts
    18

    Run Time Error 1004 (VBA Code)

    Hi VBA Programmer, I have found this code on the book but it seems that this code is not working
    the way it should be..

    error vba.JPG
    here's the code

    Please Login or Register  to view this content.
    Last edited by Cheezee; 12-09-2015 at 07:02 PM. Reason: Change title

  2. #2
    Forum Expert
    Join Date
    01-23-2013
    Location
    USA
    MS-Off Ver
    Microsoft 365 aka Office 365
    Posts
    3,863

    Re: Run Time Error 1004 (VBA Code)

    Hi Cheezee,

    Your code worked for me, although it is NOT guaranteed to work, because Sub ProcessFiles() is fed a file name only. It tries to open the text file using the default path, and sometimes it may be successful.

    See the following small changes made to Sub BatchProcess() in red:


    Please Login or Register  to view this content.
    Unrelated to your question, the above routine could be written with less code as follows:
    Please Login or Register  to view this content.
    I hope this helps.

    Lewis

+ 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. Count for specific criteria
    By Stealthbynature in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 01-07-2015, 06:49 PM
  2. [SOLVED] Kindly help on Rank Formula
    By L Raju in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 12-12-2014, 03:16 AM
  3. kindly help for this
    By simakarn1111 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-17-2014, 05:57 AM
  4. [SOLVED] Vba code to fill check in & check out counts
    By ashfaquebwd in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-20-2013, 09:02 AM
  5. kindly help to solve as below
    By sid_12 in forum Excel General
    Replies: 2
    Last Post: 07-08-2010, 03:35 PM
  6. Kindly amend this formula
    By darkhangelsk in forum Excel General
    Replies: 1
    Last Post: 08-28-2009, 01:49 PM
  7. urgent --kindly help
    By indiewolf in forum Excel General
    Replies: 3
    Last Post: 07-13-2006, 04:30 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