Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,124
Default Clear a sheet.

Sub clearsheet()
With ActiveSheet
myname = .Name
Application.DisplayAlerts = False
..Delete
Sheets.Add
ActiveSheet.Name = myname & "new"
End With
End Sub
'probably this one
Sub clearnamedsheet()
With Sheets("template")
Application.DisplayAlerts = False
..Delete
Sheets.Add
ActiveSheet.Name = "Template"
End With
End Sub

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"Kevin Burton" wrote in message
...
I want to use one sheet as a kind of work area. I plan on filling up cells
with data from various places. To make things easier for this kind of
application I would like to be able to clear a sheet. I want it just as it
started, no tables, no charts, no named ranges, clear all of the
data/cells,
etc. I could not find something like sheet.Clear(). If I get a reference
to
the work sheet like:

Excel.Worksheet baseSheet = this.Worksheets[1] as
Excel.Worksheet;

How would I clear this worksheet?

Thank you.

Kevin


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
Copy Sheet to new Sheet and clear cells on original sheets Boiler-Todd Excel Discussion (Misc queries) 7 September 23rd 09 10:02 PM
Copy sheet and clear cells on new sheet at sametime. Brad Withrow Excel Programming 2 April 10th 06 12:49 AM
Clear Sheet parteegolfer Excel Programming 1 April 2nd 06 07:01 AM
Clear a sheet [email protected] Excel Programming 2 March 2nd 06 10:44 PM
msg box to clear a sheet Curt D. Excel Programming 2 January 14th 06 08:00 AM


All times are GMT +1. The time now is 03:30 PM.

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

About Us

"It's about Microsoft Excel"