Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 38
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 230
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
deleting sheets 2&3 doug53098 Excel Discussion (Misc queries) 2 July 7th 05 08:22 PM
Deleting Sheets ExcelMonkey[_190_] Excel Programming 1 March 25th 05 10:02 AM
deleting sheets KLP Excel Discussion (Misc queries) 3 January 14th 05 12:24 AM
Deleting Sheets Jordan[_3_] Excel Programming 4 February 13th 04 03:19 PM
Deleting sheets Gary Adamson[_2_] Excel Programming 2 October 30th 03 07:24 PM


All times are GMT +1. The time now is 10:12 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"