delete sheets

  1. M

    Use time and date to trigger delete of sheets and userform

    Hi, I was hoping that someone could help me. I am wanting to use the date and time to trigger the delete of certain sheets in a workbook as well as a userform... if all the code written in VBA could be deleted then that would be grand too! I would want the code to be triggered after one year...
  2. K

    VBA Protected Book with PivotTables -- Allow "Show Detail" feature and delete sheets

    Hello, I have a project requiring the use of PivotTables in a protected Workbook. I need to code a macro that will allow users to drill down into the PivotTable values, and then will automatically delete them once the book has been closed. I have found plenty of threads demonstrating how to do...
  3. PritishS

    Delete all sheets in between two sheets

    Dear Sir/Madam, Have a nice day! Problem: I needed to delete sheets in between two sheets. What have I tried yet: After looking in Internet I have found a code in this forum which does the exactly same. Link ...
  4. Johnny Thunder

    VBA Help - Add Error Handler to Working Code - Open File

    Hi guys, working on a code that I got to work but need a small addition to this code. Currently, the code will loop thru a named range of file names and then opens and deletes specific tabs and then closes and loops to the next file. I need to add a piece of code that will move on if it comes...
  5. B

    Macro creates unwanted duplicate sheets; Need better solution to either a) delete, or b)not even create them in the first place

    Hello! First time VBA user, first time poster so please excuse any style issues with this post or my code (most of it is CTL V'd anyways). Situation: I'm creating a database for tracking cases at my work. When a cell in a range gets updated, I have created a Macro to automatically create a...
  6. M

    Deleting Sheets with VBA

    Hi - I'm trying to figure out how to delete extraneous sheets in a workbook using VBA. The following code works, but only for keeping the one sheet titled "New Month" obviously. There are two other sheets I need to keep, "Column Guide" and "Data Validation". I tried to use this: If ws.Name <>...
  7. bepedicino

    Looking for Assisttance: Copy and Past as Values VBA Coding

    I am a newbiee with no VBA experince. I have the following code that copies all sheets and then paste it as values. I would some assistance if someone could please modify the code to unhide all hidden columns first and then past all as values. If possible, I would then like it to delete all...
  8. G

    VBA Code to Prevent Users from Deleting any Worksheet in the Workbook

    There are many articles and posts on how to prevent users from deleting worksheets in Excel but none that shows what to do. I do not want to use the Protect Workbook. I want to use VBA to hide the "Delete" button when you right click on the sheet tab. Thank you for your expertise!
  9. M

    excel crashes after deleting a sheet with macro

    Hello there, I am facing problem with excel crashing when I delete two sheets using macro as follows : All I want to do is to delete two sheets named KrSh_H and UvArg_H and make fresh copies of two other sheets and name them same as deleted sheets. I start with a sheet called "1Rx1" and refer...
  10. A

    Delete specific sheets if criteria in cell met

    Hello, I've been searching for hours but haven't been able to find a code that focuses on what i am trying to do. I have a drop down menu in cell F11, sheet name is "Select Product". I would need a macro that would delete specific named sheets if a certain product is selected (sheet names "PST"...
  11. S

    Macro to delete sheets listed in column A of sheet 1

    Hi all, I made a terrible mistake and created a bunch of sheets in an excel file. There are about 350 sheets in all. I need to remove about 55. I have a list of the sheets to be removed in column A. Does anyone know a macro that can delete those sheets? Thanks!
  12. H

    Delete selected worksheets

    hi, I would like to delete from worksheets(5) all the way to the last worksheets, both inclusive. Please advise code. Thanks!

Some videos you may like

This Week's Hot Topics

  • Problem in vba vlookup
    Dear All Master, The problem I mean is as follows : 1. I want to modify the vba code because it takes too long/very slow to vlookup in VBA code...
  • VBA Vlookup
    Please for help. Why it`s not works? [CODE=vba]Sub Check_equpment1_click() Worksheets("Production_program").Activate Dim ans1 As Integer ans1 =...
  • Nesting INDEX MATCH into SUMIFS
    I currently have several formulas pulling in a SUMIFS from a data sheet, beginning with =SUMIFS('datasheet'!$N:$N, 'datasheet..... but as I am...
  • Extracting number from a range randomly
    Hello Expert, please kindly advise what is the best method to extract numbers from a range randomly I have a series of numbers in the range of A1...
  • Problem with If Formula
    I am using the following formula in cell A5. I would like if N5 is blank then A5 also return blank. If N5 is 0 or is greater than zero then equals...
  • Is there a way to make the day's name show up automatically in a header?
    I have a form I print out every day..and in the top right custom header I have the &[DATE], which automatically gives the current date in top...
Top