+ Reply to Thread
Results 1 to 5 of 5

Delete cell when worksheet deleted

  1. #1
    Registered User
    Join Date
    02-08-2014
    Location
    United States
    MS-Off Ver
    Excel 2011
    Posts
    60

    Delete cell when worksheet deleted

    Hello,
    I want to delete a cell row in a table when I delete a corresponding worksheet with the same name as the cell.

    For example, on the attached, if I delete the worksheet "Shawn" then I want row with "Shawn" deleted from the table on the "Example" tab. If I delete "Becky" worksheet then the row with "Becky" should be deleted from the table on the "Example" tab.

    Thanks in advance for any help.

    Shawn V.
    Attached Files Attached Files

  2. #2
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,788

    Re: Delete cell when worksheet deleted

    To Add Excel VBA Code to a Workbook / This Workbook Module

    1. Copy the code that you want to use
    2. Select the workbook in which you want to store the code
    3. Hold the Alt key, and press the F11 key, to open the Visual Basic Editor
    4. In the Project Explorer, find your workbook, and open the list of Microsoft Excel Objects
    5. Right-click on the ThisWorkbook object, and choose View Code
    6. Where the cursor is flashing, choose Edit | Paste

    Please Login or Register  to view this content.


    If your problem is solved, then please mark the thread as SOLVED>>Above your first post>>Thread Tools>>
    Mark your thread as Solved


    If the suggestion helps you, then Click *below to Add Reputation

  3. #3
    Registered User
    Join Date
    02-08-2014
    Location
    United States
    MS-Off Ver
    Excel 2011
    Posts
    60

    Re: Delete cell when worksheet deleted

    Thanks SixthSense, but the code isn't working. Is there any way to directly reference the table instead of A:A?

  4. #4
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,788

    Re: Delete cell when worksheet deleted

    Please refer the attached file
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    02-08-2014
    Location
    United States
    MS-Off Ver
    Excel 2011
    Posts
    60

    Re: Delete cell when worksheet deleted

    Thanks, works like a charm now. I appreciate your follow-up and your help. You're awesome.

+ 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. Replies: 3
    Last Post: 07-01-2014, 03:41 PM
  2. [SOLVED] Comments from drop down list - delete if cell value deleted.
    By Duguids in forum Excel General
    Replies: 5
    Last Post: 09-11-2013, 08:24 AM
  3. Automatically delete cell contents if 1 cell deleted
    By BudParker in forum Excel General
    Replies: 2
    Last Post: 11-08-2009, 11:20 AM
  4. Delete cell if another cell deleted
    By Directlinq in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 06-22-2009, 02:59 AM
  5. delete the copy of row to another worksheet when date is deleted
    By Peaches in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-17-2005, 10:05 PM

Tags for this Thread

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