PC Review


Reply
Thread Tools Rate Thread

Clear data button for workbooks

 
 
takatross
Guest
Posts: n/a
 
      15th Oct 2003
Does anyone know how to create a button or tab that you can click on, in
the workbook, that will delete data in the worksheets.

I've made an overtime tracking spreadsheet that calculates hours over a
14 week period. (14 worksheets) However, after the quarter or 14 week
period is over I currently have to go back and delete all the data
hours in the workbook in order to start a new 14 week period. I'd like
to create one button(cell) that I can click on that will clear all data
for me. Any ideas or advice?

thanks,

tim



------------------------------------------------
~~ Message posted from http://www.ExcelTip.com/
~~ View and post usenet messages directly from http://www.ExcelForum.com/

 
Reply With Quote
 
 
 
 
Paul B
Guest
Posts: n/a
 
      15th Oct 2003
Tim, how about clicking the square above the 1 and next to the A to select
all cells and press delete?

--
Paul B
Always backup your data before trying something new
Using Excel 2000 & 97
Please post any response to the newsgroups so others can benefit from it
** remove news from my email address to reply by email **
"takatross" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Does anyone know how to create a button or tab that you can click on, in
> the workbook, that will delete data in the worksheets.
>
> I've made an overtime tracking spreadsheet that calculates hours over a
> 14 week period. (14 worksheets) However, after the quarter or 14 week
> period is over I currently have to go back and delete all the data
> hours in the workbook in order to start a new 14 week period. I'd like
> to create one button(cell) that I can click on that will clear all data
> for me. Any ideas or advice?
>
> thanks,
>
> tim
>
>
>
> ------------------------------------------------
> ~~ Message posted from http://www.ExcelTip.com/
> ~~ View and post usenet messages directly from http://www.ExcelForum.com/
>



 
Reply With Quote
 
Debra Dalgleish
Guest
Posts: n/a
 
      15th Oct 2003
One solution is to create a template that you can reuse:

1. Make a copy of your spreadsheet, and delete all the data
that will change each month.
2. Choose File>Save As
3. Type a name for the template, e.g. Overtime
4. From the 'Save as type' dropdown, choose Template (*.xlt)
The file name will change to an .xlt extension.
5. The template folder should automatically appear in the 'Save in'
dropdown at the top of the dialog box.
6. Click Save
7. Close the template.

At the start of the next 14 week period, choose File>New.
If you're using Excel 2002, from the Task Bar, under Templates, click on
'General Templates', select your template, and click OK.

takatross wrote:
> Does anyone know how to create a button or tab that you can click on, in
> the workbook, that will delete data in the worksheets.
>
> I've made an overtime tracking spreadsheet that calculates hours over a
> 14 week period. (14 worksheets) However, after the quarter or 14 week
> period is over I currently have to go back and delete all the data
> hours in the workbook in order to start a new 14 week period. I'd like
> to create one button(cell) that I can click on that will clear all data
> for me. Any ideas or advice?



--
Debra Dalgleish
Excel FAQ, Tips & Book List
http://www.contextures.com/tiptech.html

 
Reply With Quote
 
Paul B
Guest
Posts: n/a
 
      15th Oct 2003
Tim, after reading Debra's post I see where you might not want to "clear all
data", just to give you another option you could select all the cells you
want to clear and name them, insert, name, define and then use something
like this with the defined name as My_Range, and assign it to a button.

Sub Clear_Data()
Range("My_Range").ClearContents
End Sub

--
Paul B
Always backup your data before trying something new
Using Excel 2000 & 97
Please post any response to the newsgroups so others can benefit from it
** remove news from my email address to reply by email **
"Paul B" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Tim, how about clicking the square above the 1 and next to the A to select
> all cells and press delete?
>
> --
> Paul B
> Always backup your data before trying something new
> Using Excel 2000 & 97
> Please post any response to the newsgroups so others can benefit from it
> ** remove news from my email address to reply by email **
> "takatross" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> > Does anyone know how to create a button or tab that you can click on, in
> > the workbook, that will delete data in the worksheets.
> >
> > I've made an overtime tracking spreadsheet that calculates hours over a
> > 14 week period. (14 worksheets) However, after the quarter or 14 week
> > period is over I currently have to go back and delete all the data
> > hours in the workbook in order to start a new 14 week period. I'd like
> > to create one button(cell) that I can click on that will clear all data
> > for me. Any ideas or advice?
> >
> > thanks,
> >
> > tim
> >
> >
> >
> > ------------------------------------------------
> > ~~ Message posted from http://www.ExcelTip.com/
> > ~~ View and post usenet messages directly from

http://www.ExcelForum.com/
> >

>
>



 
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
Data Validation and a Clear Button mrhilder@gmail.com Microsoft Excel Programming 8 31st Dec 2007 08:23 PM
Create a Clear button to clear unprotected cells Jcraig713 Microsoft Excel Programming 2 26th Nov 2007 03:55 PM
How can I recover data from "Clear Offline Items Button" in InBox. =?Utf-8?B?Q2xlYXIgT2ZmbGluZSBJdGVtcyBidXR0b24=?= Microsoft Outlook Discussion 0 27th Aug 2007 04:22 PM
Button to clear all data in a record =?Utf-8?B?TWFheA==?= Microsoft Access 2 4th Feb 2007 08:25 PM
Userforms submit button to clear after it enters data? carlaruge Microsoft Excel Programming 2 8th Jul 2005 01:50 AM


Features
 

Advertising
 

Newsgroups
 


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