+ Reply to Thread
Results 1 to 11 of 11

VBA Project - Sheets duplicate

  1. #1
    Registered User
    Join Date
    08-06-2012
    Location
    Montreal, Canada
    MS-Off Ver
    Excel 2010
    Posts
    91

    VBA Project - Sheets duplicate

    Hi!

    I have a problem with macro sheet that duplicates, how can I delete the old one and get back to Feuil8 only, not Feuil8111111.

    vba.jpg

    Thanks,
    JP

  2. #2
    Forum Expert Solus Rankin's Avatar
    Join Date
    05-24-2013
    Location
    Hollywood, CA
    MS-Off Ver
    Win7 Office 2010 VS Express 2012
    Posts
    2,655

    Re: VBA Project - Sheets duplicate

    Instead of a picture, you can attach an example workbook.

    To attach a workbook, click the 'Go Advanced' button below and use the paperclip in the toolbar to navigate to your document.
    Thanks,
    Solus


    Please remember the following:

    1. Use [code] code tags [/code]. It keeps posts clean, easy-to-read, and maintains VBA formatting.
    Highlight the code in your post and press the # button in the toolbar.
    2. Show appreciation to those who have helped you by clicking below their posts.
    3. If you are happy with a solution to your problem, mark the thread as [SOLVED] using the tools at the top.

    "Slow is smooth, smooth is fast."

  3. #3
    Registered User
    Join Date
    08-06-2012
    Location
    Montreal, Canada
    MS-Off Ver
    Excel 2010
    Posts
    91

    Re: VBA Project - Sheets duplicate

    Thanks! Here we go:

    Template_Soumission_v11.xlsm


    JP

  4. #4
    Forum Expert Solus Rankin's Avatar
    Join Date
    05-24-2013
    Location
    Hollywood, CA
    MS-Off Ver
    Win7 Office 2010 VS Express 2012
    Posts
    2,655

    Re: VBA Project - Sheets duplicate

    Maybe
    Please Login or Register  to view this content.
    Untested. I'm not really strong with French.

  5. #5
    Registered User
    Join Date
    08-06-2012
    Location
    Montreal, Canada
    MS-Off Ver
    Excel 2010
    Posts
    91

    Re: VBA Project - Sheets duplicate

    Good! Thanks! Is there an easy way to remove those unused sheet now?

  6. #6
    Forum Expert Solus Rankin's Avatar
    Join Date
    05-24-2013
    Location
    Hollywood, CA
    MS-Off Ver
    Win7 Office 2010 VS Express 2012
    Posts
    2,655

    Re: VBA Project - Sheets duplicate

    Right click and delete?

  7. #7
    Registered User
    Join Date
    08-06-2012
    Location
    Montreal, Canada
    MS-Off Ver
    Excel 2010
    Posts
    91

    Re: VBA Project - Sheets duplicate

    Lol no.. the "object sheets" in vba ..

  8. #8
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,436

    Re: VBA Project - Sheets duplicate

    Not sure you can remove those imposter 'Thisworkbook' objects.

    You may need to transfer all your good sheets and code in to a fresh workbook.
    Cheers
    Andy
    www.andypope.info

  9. #9
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,463

    Re: VBA Project - Sheets duplicate

    It's very off. They have references like sheet numbers but they actually refer to ThisWorkbook. Hence, you can't unhide them, you can't delete them, and they're not code modules so you can't remove them. Must have been an interesting bit of code.

    Regards, TMS
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  10. #10
    Forum Expert
    Join Date
    04-22-2013
    Location
    .
    MS-Off Ver
    .
    Posts
    4,418

    Re: VBA Project - Sheets duplicate

    If you save it as a .xlsx that should get rid of the "ghosts" of thisworkbook and then you can copy the code back in. Not sure if that is any quicker than copying everything into a new workbook as Andy Pope suggests.

    Edit: A look around google suggests saving as xl95 workbook or using a workbook cleaner may also work
    Last edited by ragulduy; 03-18-2014 at 12:23 PM.

  11. #11
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,463

    Re: VBA Project - Sheets duplicate

    Replacement workbook attached. Worksheets made visible and copied to a new workbook and saved. Sheets then hidden again.


    Regards, TMS
    Attached Files Attached Files

+ 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. Project - Populating from other sheets via drop-downs, etc
    By zcast in forum Excel - New Users/Basics
    Replies: 2
    Last Post: 04-13-2012, 04:56 PM
  2. password protect certain sheets within the project
    By Mekanto in forum Excel General
    Replies: 2
    Last Post: 11-09-2007, 02:32 PM
  3. Unlock VBA project or Copy Sheets
    By Charlie in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-02-2005, 06:20 PM
  4. [SOLVED] Unlock VBA project or Copy Sheets
    By Charlie in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-02-2005, 06:17 PM
  5. [SOLVED] Delete Sheets in VBA Project
    By Frank Rudd via OfficeKB.com in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 07-26-2005, 02: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