reset a cell

S

Steve

Hiya all,

Newbie alert!!.

I would like to thank those who have helped me so far!! .. your all fab.


onto the question.



When I call a sheet i need it to reset a cell to empty each time its
called. How?


thx


---
avast! Antivirus: Outbound message clean.
Virus Database (VPS): 080107-0, 07/01/2008
Tested on: 08/01/2008 00:00:25
avast! - copyright (c) 1988-2008 ALWIL Software.
http://www.avast.com
 
J

JLGWhiz

If you want it really empty:
ActiveCell.Clear

If you only want the visible data gone and leave format and formulas then
ActiveCell.ClearContents.
 
J

JLGWhiz

Including the sheet reference:

Worksheets("Sheet1").Range("A1").Clear

or if you use the Select and Activate method and have selected
the sheet and cell you want.

ActiveSheet.ActiveCell.Clear
 
D

Dave Peterson

Maybe...

Worksheets("Sheet1").Range("A1").ClearContents

..Clear will clear the formatting, too. .ClearContents will just empty the cell.
 
J

JLGWhiz

Yep, I already told him that clears everything in the previous posting.
This one was just to show him how without using select or activate.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Auto insert 2
How do you hide ..... 2
Spin button 2
Locking Cells 1
newbie - If a cell is blank 2
Hidding buttons 3
VBA time and date? 1
Transparent button 5

Top