+ Reply to Thread
Results 1 to 4 of 4

Macro code to continue iterating if error.

  1. #1
    Registered User
    Join Date
    03-18-2013
    Location
    London, England
    MS-Off Ver
    Excel 2007
    Posts
    5

    Macro code to continue iterating if error.

    Hi,

    I am trying to rename 2 tabs each on 60 files, this is the code I have below.

    Please Login or Register  to view this content.
    The problem is, some of the files have the tabs named correctly or have a name other than the one specified in my macro.

    Eg: 70% of the files have the tabs named "EXCEPTION 3 MONTH", 20% have "EXCPTION 3 MONTH" and 10% have "EXCEPTIONAL 3 MONTH" as the tab names.

    Is there a way I could I force all other names of the tabs to be changed to the new one ?

    Thanks,
    Last edited by sid9221; 03-23-2013 at 03:15 PM.

  2. #2
    Valued Forum Contributor Sean Thomas's Avatar
    Join Date
    03-25-2012
    Location
    HerneBay, Kent, UK
    MS-Off Ver
    Excel 2007,2016
    Posts
    971

    Re: Macro code to continue iterating if error.

    try using this in your code

    Please Login or Register  to view this content.
    Regards
    Sean

    Please add to my reputation if you think i helped
    (click on the star below the post)
    Mark threads as "Solved" if you have your answer
    (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code:
    [code] Your code here [code]
    Please supply a workbook containing example Data:
    It makes its easier to answer your problem & saves time!

  3. #3
    Valued Forum Contributor Sean Thomas's Avatar
    Join Date
    03-25-2012
    Location
    HerneBay, Kent, UK
    MS-Off Ver
    Excel 2007,2016
    Posts
    971

    Re: Macro code to continue iterating if error.

    sorry, forgot to take the msgbox's out of the code.
    Just using those to check it was working.

    Please Login or Register  to view this content.

  4. #4
    Forum Expert
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    8,448

    Re: Macro code to continue iterating if error.

    I haven't tested this but something like this is what you need.


    Please Login or Register  to view this content.

+ 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