+ Reply to Thread
Results 1 to 2 of 2

Code Required To Avoid Error on Worksheet Insert

  1. #1
    Registered User
    Join Date
    01-06-2012
    Location
    Sherwood Park, Alberta
    MS-Off Ver
    Excel 2010
    Posts
    1

    Code Required To Avoid Error on Worksheet Insert

    Worksheet Title: "Summary"
    Column A, starting in row 2:
    A
    B
    C
    D

    The code below effectively creates and renames four (4) worksheets "A", "B", "C" and "D". But, if I add a row with "E" and run the macro, I get an error basically saying A, B, C and D already exist so you are screwed....

    I need to insert code that will allow me to create only new worksheets for the new data in column A. Thank you so much for your help.

    Please Login or Register  to view this content.
    Last edited by DonkeyOte; 01-06-2012 at 04:01 PM. Reason: CODE tags please (per Rules) - amended (1st post)

  2. #2
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Code Required To Avoid Error on Worksheet Insert

    Please use CODE tags when posting VBA to the board.

    In answer to your question - validate existence of sheet prior to addition:

    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