+ Reply to Thread
Results 1 to 3 of 3

Overwrite or Replace existing Worksheet with VBA

  1. #1
    Registered User
    Join Date
    05-13-2013
    Location
    greensboro, nc
    MS-Off Ver
    Excel 2010
    Posts
    12

    Overwrite or Replace existing Worksheet with VBA

    Hello all!

    I am really banging my head on a wall....
    I have a macro, that generates a worksheet based on the users input. It generates to a template worksheet, and is then transfered to a
    "dumbed down" worksheet. The problem is, they can, and do, initiate the same search twice. This results in a "Run-Time" error. Here is the
    bit of code that transfers the data from the "Template".
    The Template is named based on the users query. Ex: Input Query (value1) is "Hammer", sheet transfer name is "Hammer-DATA"
    ANY and ALL help would be appreciated!!!!

    Thanks

    Please Login or Register  to view this content.

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Overwrite or Replace existing Worksheet with VBA

    So you want to be sure the macro doesn't try to create Hammer-DATA a second time? Something like this, perhaps:

    Please Login or Register  to view this content.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Registered User
    Join Date
    05-13-2013
    Location
    greensboro, nc
    MS-Off Ver
    Excel 2010
    Posts
    12

    Re: Overwrite or Replace existing Worksheet with VBA

    Thank YOU!! I know i was just looking at it from the wrong direction!!!

+ 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. Overwrite existing directory
    By bberger1985 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 11-27-2013, 06:28 PM
  2. Overwrite existing record
    By bryan1706 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-09-2012, 11:15 AM
  3. [SOLVED] Copy worksheet from one WB to another, overwrite existing worksheet with same CodeName
    By Renns in forum Excel Programming / VBA / Macros
    Replies: 22
    Last Post: 08-31-2012, 10:30 AM
  4. Overwrite existing data
    By kishoremcp in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 01-21-2012, 09:10 PM
  5. Command to 'overwrite' existing sheet
    By Greed in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 12-14-2011, 01:35 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