Results 1 to 2 of 2

Re: Looking for Excel Time Bomb to delete worksheet based on future date

Threaded View

  1. #1
    Registered User
    Join Date
    08-02-2018
    Location
    Douglas Mi
    MS-Off Ver
    2016
    Posts
    17

    Re: Looking for Excel Time Bomb to delete worksheet based on future date

    Dear Excel Forum,
    This is what I have on "ThisWorkbook"
    As mentioned in my introduction the first two macro's work great.
    Unfortunately, my third attempt at creating a Time Bomb macro based on a future date isn't working.
    I get a Compile error: Ambiguous name detected: Workbook_Open
    The File name is" Elbe Selector 2019
    Private Sub workbook_beforeclose(Cancel As Boolean)
        Worksheets("Elbe").[B4,E4,E6,E7,E8,E10,E12,E14,E17,E19,E20,E22,E23,E25,E26,E27,E28,E29,E30,E50,E51,E93,E94,E95,I2,I3] = ""
        Worksheets("Companion Flanges").[D20,D22,D24,D26,D28] = ""
        Worksheets("Duty Cycle").[E12,E13,E14,E15,E16,E17,E18,E19,E20,E21,E22,G12,G13,G14,G15,G16,G17,G18,G19,G20,G21,G22,I11,I12,I13,I14,I15,I16,I17,I18,I19,I20,I21,I22] = ""
        Worksheets("Driveline Geomentry").[B3,B5,B7,B9,B11,B13,B14] = ""
       End Sub
    
    Private Sub Workbook_Open()
    Splashscreen.Show
    End Sub
    
    Private Sub Workbook_Open()
    If Date < #8/1/2018# Then Exit Sub
    With ThisWorkbook
    .Saved = True
    Kill .FullName
    .Close False
    End With
    End Sub
    Question: Is a Time Bomb option possible based on a date in the future?
    I'm looking to delete my: "Elbe Selector 2019" spreadsheet each quarter based on a future calendar date.
    I won't be needing a Read Only option. Just need to delete the entire file each quarter.

    Rob
    Last edited by dominicb; 08-02-2018 at 10:29 AM. Reason: Code tags added

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Looking for Excel Time Bomb to delete worksheet based on future date
    By Rob Surina in forum Hello..Introduce yourself
    Replies: 3
    Last Post: 08-02-2018, 10:57 AM
  2. Easiest way to time bomb a workbook
    By Big_Slick in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-21-2014, 10:18 PM
  3. Kill command/ Time bomb/ permanently delete
    By ThomasAnthony in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 11-06-2014, 08:29 AM
  4. Time bomb not working
    By go2review in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 11-05-2014, 12:24 AM
  5. auto delete all data based on a future date
    By dawondr in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-27-2013, 02:01 PM
  6. Deducting Current Date & time with Future Date and Time
    By mangesh in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 06-03-2013, 07:30 AM
  7. Excel VBA find newest worksheet based on date/time stamp in worksheet name?
    By takchin.tc in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 10-27-2012, 03:56 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