Search : in
By :

Delete Sheets in Excel

Last answer on Jul 22, 2009 10:45:32 am BST ujo, on Jul 22, 2009 7:38:54 am BST 
 Report this message to moderators

Hello,

I am looking for a VBA macro that can delete all the sheets in Excel the start with name "Sheet".
Also if no such sheet name is found it should give a simple msg box saying No sheet found. And if delete is successful it should say Sheets deleted.

Regards
Ujo

Best answers for « Delete Sheets in Excel » in :
Basic Excel Formulas ShowBasic Excel Formulas Below are some basic formulas for Microsoft excel: Basic formula : ADDITION cell A1 to A10 = sum (A1: A10) AVERAGE cell A1 to A10 = average (A1: A10) MAXIMUM cell A1 to A10 = max (A1: A10) MINIMUM...
Inserting an Hyperlink in an Excel Worksheet ShowCreating an Hyperlink in an Excel Worksheet Introduction Implementation Linking to a Website Linking to a document Linking to another cell in the spreadsheet Notes Introduction Excel supports the use of hyperlinks and it is a very...
VBA: How to know everything about the file folder ShowVBA: How to know everything about the file folder Preliminaries In module In sheet1 module Preliminaries Open a new workbook Add a module In module ' Declare variables for wizard. Public balloon1 As Balloon Public balloon2...
Download Excel-MySQL converter ShowHenceforth with Excel-MySQL Converter, it is not necessary to be a developer to be able to convert Microsoft Excel data into MySQL database or vice versa. This program allows you to convert quickly your data without using other material. Depending...
Linux - The shell ShowIntroduction to the shell The command interpreter is the interface between the user and the operating system, hence the name "shell". The shell therefore acts as an intermediary between the operating system and the user thanks to command lines...
Declaring a style sheet (CSS) ShowDeclaring a style sheet Style sheets are not directly integrated into the W3C's HTML recommendations. For this reason, you need to include elements in the HTML code indicating both the type of document, meaning the version of the HTML and CSS...
Spreadsheets - The Excel Interface ShowExcel Introduction Microsoft Excel is the spreadsheet in the Microsoft Office office suite. To start it, simply click on the appropriate icon in the Start menu (in Windows) or click on an Excel file (that has an .xls file extension). A Excel...

1

 venkat1926, on Jul 22, 2009 10:45:32 am BST

Tha macro is

Sub test()
Dim j As Integer, k As Integer
Application.DisplayAlerts = False
j = Worksheets.Count
For k = 1 To j
If Worksheets(k).Name = "sheet" Then
Worksheets(k).Delete
GoTo line1
End If
Next k
line1:
Application.DisplayAlerts = True
End Sub

Reply to venkat1926