Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Deleting sheets
Has anybody done this?
Is there a way I can save the current cell values in sheet 1, delete my data sheet (sheet 2) with a macro? Thanks |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Deleting sheets
Maybe something like this, save your file before running this;
Sub DelSht() On Error GoTo ErrorHandler Application.DisplayAlerts = False With Sheets("Sheet1") .Cells.Copy .Cells.PasteSpecial Paste:=xlValues End With Sheets("Sheet2").Delete ErrorHandler: Application.DisplayAlerts = True End Sub Hope this helps Rowan "TK" wrote: Has anybody done this? Is there a way I can save the current cell values in sheet 1, delete my data sheet (sheet 2) with a macro? Thanks |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Deleting sheets
Hi,
Worksheets("Sheet2").Cells.Copy Worksheets("Sheet1").Cells.PasteSpecial Paste:=xlPasteValues Application.DisplayAlerts = False Worksheets("Sheet2").Delete Application.DisplayAlerts = True "TK" wrote in message . .. Has anybody done this? Is there a way I can save the current cell values in sheet 1, delete my data sheet (sheet 2) with a macro? Thanks |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
deleting sheets 2&3 | Excel Discussion (Misc queries) | |||
Deleting Sheets | Excel Programming | |||
deleting sheets | Excel Discussion (Misc queries) | |||
Deleting Sheets | Excel Programming | |||
Deleting sheets | Excel Programming |