+ Reply to Thread
Results 1 to 4 of 4

Loop through .xml files stored in a folder and format it using VBA

  1. #1
    Registered User
    Join Date
    07-21-2016
    Location
    United States
    MS-Off Ver
    2013
    Posts
    2

    Loop through .xml files stored in a folder and format it using VBA

    So I have around 100 excel files saved as .xml in my folder and I have written a VBA code which formats the layout settings of each worksheet of all the workbooks(files) in my folder. But the problem is the code does not work on the last worksheet of all the workbooks, it works perfectly fine for the rest i.e. till the last worksheet of each workbook. Here is the code:

    Please Login or Register  to view this content.
    Pleas/e let me know where I went wrong. Thanks
    Last edited by karankk; 08-01-2016 at 08:46 PM.

  2. #2
    Forum Expert
    Join Date
    10-06-2008
    Location
    Canada
    MS-Off Ver
    2007 / 2013
    Posts
    5,565

    Re: Loop through .xml files stored in a folder and format it using VBA

    The first place where you went wrong is not adhering to the forum rules.
    In your case, number 3 in the forum rules.

  3. #3
    Registered User
    Join Date
    07-21-2016
    Location
    United States
    MS-Off Ver
    2013
    Posts
    2

    Re: Loop through .xml files stored in a folder and format it using VBA

    Sorry about that. I have made the change.

  4. #4
    Forum Expert Alf's Avatar
    Join Date
    03-13-2004
    Location
    Gothenburg/Mullsjoe, Sweden
    MS-Off Ver
    Excel 2019 and not sure I like it
    Posts
    4,760

    Re: Loop through .xml files stored in a folder and format it using VBA

    Strange as your code looks right to me. You could try
    Please Login or Register  to view this content.
    and you would need to dim i as an Integer and you end the loop with
    Please Login or Register  to view this content.
    of cource. But as I said I'm puzzled because your loop should work.

    Alf

+ 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. [SOLVED] Help request to convert all the word files to PDF stored in a folder
    By mso3 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-04-2016, 07:06 AM
  2. [SOLVED] How to convert all word files stored in the folder to PDF automatically?
    By mso3 in forum Word Programming / VBA / Macros
    Replies: 13
    Last Post: 11-02-2015, 12:01 PM
  3. [SOLVED] Loop Through Folder, Create Emails with Sub Folder Names in Subject, Attach files in sub
    By Rschwar23 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-30-2015, 10:06 AM
  4. Replies: 12
    Last Post: 03-09-2015, 05:52 PM
  5. problem with macro - trying to extract subjects from .msg files stored in folder
    By mwilkes in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 12-10-2013, 07:06 PM
  6. [SOLVED] How to Extract .zip files stored in a folder using VBA
    By zaska in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-16-2012, 01:24 PM
  7. Copy a row from 3000 excel files stored in a folder and paste it in a new workbook
    By hubertus in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 07-28-2009, 10:34 AM

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