PC Review


Reply
Thread Tools Rate Thread

Clear a sheet.

 
 
Kevin Burton
Guest
Posts: n/a
 
      19th Jun 2008
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 With Quote
 
 
 
 
Don Guillett
Guest
Posts: n/a
 
      19th Jun 2008
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
(E-Mail Removed)
"Kevin Burton" <(E-Mail Removed)> wrote in message
news:BD082EA5-A9B0-4602-B828-(E-Mail Removed)...
>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 With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Copy Sheet to new Sheet and clear cells on original sheets Boiler-Todd Microsoft Excel Misc 7 23rd Sep 2009 10:02 PM
Copy sheet and clear cells on new sheet at sametime. Brad Withrow Microsoft Excel Programming 2 10th Apr 2006 12:49 AM
Clear Sheet parteegolfer Microsoft Excel Programming 1 2nd Apr 2006 07:01 AM
Clear a sheet gimme_this_gimme_that@yahoo.com Microsoft Excel Programming 2 2nd Mar 2006 10:44 PM
msg box to clear a sheet =?Utf-8?B?Q3VydCBELg==?= Microsoft Excel Programming 2 14th Jan 2006 08:00 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 01:37 PM.