ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Auto Clear Cells (https://www.excelbanter.com/excel-programming/290942-auto-clear-cells.html)

PeteS

Auto Clear Cells
 
I have been given the task of creating a simple office sheet that would serve as an In/Out Board. We want to have certain cells be cleared everyday so that the comment areas are fresh to add notes to. How specifically can I add a macro that will automaticall clear a set of cells at a certain time? The cells can only be cleared once a day and not every time the file opens

Please help

Pete

A.W.J. Ales

Auto Clear Cells
 
Pete,

An example :

Sub ClearCells()
Worksheets("Sheet1").Range("D2").ClearContents
Worksheets("Sheet1").Range("H4:J6").ClearContents
End Sub

Replace the sheetnames en the cellranges to the values you need and run the
macro whenever you need it to run.

--
Regards,
Auk Ales

* Please reply to this newsgroup only *
* I will not react on unsolicited e-mails *

"PeteS" wrote in message
...
I have been given the task of creating a simple office sheet that would

serve as an In/Out Board. We want to have certain cells be cleared everyday
so that the comment areas are fresh to add notes to. How specifically can I
add a macro that will automaticall clear a set of cells at a certain time?
The cells can only be cleared once a day and not every time the file opens.

Please help!

Pete




Gord Dibben

Auto Clear Cells
 
Pete

To go with Auk's code you can visit Chip Pearson's site and learn how to run
the code at a specific time.

http://www.cpearson.com/excel/ontime.htm

Gord Dibben Excel MVP

On Tue, 10 Feb 2004 23:33:07 +0100, "A.W.J. Ales"
wrote:

Pete,

An example :

Sub ClearCells()
Worksheets("Sheet1").Range("D2").ClearContents
Worksheets("Sheet1").Range("H4:J6").ClearContents
End Sub

Replace the sheetnames en the cellranges to the values you need and run the
macro whenever you need it to run.




All times are GMT +1. The time now is 05:38 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com