+ Reply to Thread
Results 1 to 2 of 2

Verify Sheet exist before copying

  1. #1
    Registered User
    Join Date
    03-29-2020
    Location
    Canton, Ohio
    MS-Off Ver
    2016
    Posts
    7

    Verify Sheet exist before copying

    I am creating a workbook for work that will contain customer data. Each sheet will be named for the customer number. On my main page I have an ActiveX command button that runs the sub shown below. Once I click on the button it will ask me to input the customer number I want to create, then it makes the Starter Sheet visible, makes a copy of Starter Sheet it and renames it to the customer number that I entered and then hides the starter sheet.

    It works well except for a little flaw. The flaw it has is if the sheet already exists then the code copies the starter sheet and renames it Starter Sheet(X). I need help with making the code. If sheet exist then prompt sheet exist but don't allow the sheet to be created.

    The Starter Sheet is a formatted sheet that I plan to use each customer. It has code on the sheet that takes the sheet name an places it on a cell on said sheet.

    I also would like to restrict the data being entered to 5 digits only (00001 - 99999)

    Any help and suggestions would be greatly appreciated.

    AmosA


    Code I am using.

    Please Login or Register  to view this content.
    Last edited by davesexcel; 04-07-2020 at 01:54 PM. Reason: code tags required

  2. #2
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010, 2013
    Posts
    7,821

    Re: Verify Sheet exist before copying

    Try:
    Please Login or Register  to view this content.
    You can say "THANK YOU" for help received by clicking the Star symbol at the bottom left of the helper's post.
    Practice makes perfect. I'm very far from perfect so I'm still practising.

+ 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] Copying a filtering table is copying everything if that filtered item does not exist.
    By taylorsm in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 02-12-2018, 09:14 AM
  2. Verify if folder exist
    By calvinle in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-05-2017, 12:31 AM
  3. numbers separated by commas that I need to verify exist on another sheet
    By mheinmiller in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 04-18-2015, 09:44 PM
  4. [SOLVED] Verify that record dosen't exist on user form text box entry
    By jprlimey in forum Excel Programming / VBA / Macros
    Replies: 13
    Last Post: 10-16-2014, 05:23 PM
  5. [SOLVED] Verify if sheet name still exist
    By Edmund in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 07-11-2006, 01:35 PM
  6. Verify if a workbook exist with a macro
    By Homero in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-01-2005, 02:05 PM
  7. Verify if Comment exist in a cell
    By Tom LeBold in forum Excel General
    Replies: 2
    Last Post: 09-15-2005, 04:05 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