Forum Discussion
Delete an EXCEL worksheet
Thank you for your response to my message. While I do not use macros, I do utilize a number of EXCEL functions (sumifs, vlookup, countif, etc.). I also ran several virus and malware detection scans, none were found. When the workbook closes it is immediate, I would classify it as crashing. Strange, there are probably 50 worksheets in this workbook. You can select any other tab and the workbook functions normally. Open this one and it will immediately crash each time; which is why I was determined to simply delete the sheet and then recreate it; but I cannot delete it, the crash is immediate and does not allow me enough time to delete the sheet normally. I was hoping there was a way to delete a sheet without opening it.
Thank you again for considering ways you are aware of to resolving this problem.
jerry wheatley
Ok, please try this solution:
- Open the workbook
- Press Alt+F11 to open the Visual Basic for Applications editor
- Put this command in the Immediate window: Thisworkbook.Worksheets("SheetName").Delete
- If the Immediate window isn't visible, press Ctrl+G to show it.
- Please replace the SheetName in the command with the real sheet name.
- Press Enter
- jerry wheatleyMay 22, 2018Copper Contributor
Thank you so very much help me resolve my issue. Although I'm comfortable using the functionality EXCEL provides; I'm afraid I'm not tech savvy enough to understand how to correct an issue like the one I presented to you. Thanks again for your assistance.
jpw