Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
deleting selected worksheets using vb code
Can anybody tell how do I deleted selected worksheets using vb codes. The
whole code would also include clear contents of a number of cells in Sheet(2) and deleting all sheets after sheet(2). Thank you. -- George |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
deleting selected worksheets using vb code
Maybe this'll get you started:
Option Explicit Sub testme() Dim iCtr As Long Application.DisplayAlerts = False For iCtr = Sheets.Count To Sheets("Sheet(2)").Index + 1 Step -1 Sheets(iCtr).Delete Next iCtr Worksheets("Sheet(2)").Range("a1:b3,c9,d12:e99").C learContents End Sub George wrote: Can anybody tell how do I deleted selected worksheets using vb codes. The whole code would also include clear contents of a number of cells in Sheet(2) and deleting all sheets after sheet(2). Thank you. -- George -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Text formatting | Excel Worksheet Functions | |||
How to compress an Excel file once deleting extra worksheets | Excel Discussion (Misc queries) | |||
Question about deleting rows from sorted linked worksheets | Excel Worksheet Functions | |||
Using other workbooks.. | Excel Worksheet Functions | |||
Make Change Case in Excel a format rather than formula | Excel Worksheet Functions |