Is there a way to make a quot;resetquot; button to clear only select cells?
Hi 1vagrowr
Assuming you are selecting cells manually, why don't you just use the delete
button?
Dave.quot;1vagrowrquot; gt; wrote in message
...
gt; Is there a way to make a quot;resetquot; button to clear only select cells?
There were 2 responses (from me and Bob Phillips) to your earlier 2
identical questions in this newsgroup some 3 days ago, which have not
received any feedback from you in the threads.:
a, tinyurl.com/bmrs5
(Bob Phillips)
b. tinyurl.com/bqg7y
(Max)
--
Rgds
Max
xl 97
---
Singapore, GMT 8
xdemechanik
savefile.com/projects/236895
--
quot;1vagrowrquot; gt; wrote in message
...
gt; Is there a way to make a quot;resetquot; button to clear only select cells?
Hi Ivagrwr,
In addition to the responses indicated by Max, if the cells to be cleared
are constant, try assigning the following macro to your button:
'=============gt;gt;
Sub ClearCells()
Dim Rng As Range
Set Rng = Range(quot;A1:A20quot;) 'lt;lt;==== CHANGE
Rng.Clear
End Sub
'lt;lt;=============
If your intention is to delete the contents but retain formats, change:
Rng.Clear
to:
Rng.ClearContents
If you are not familiar with macros, you may wish to visit David McRitchie's
'Getting Started With Macros And User Defined Functions' at:
www.mvps.org/dmcritchie/excel/getstarted.htm---
Regards,
Norman
quot;1vagrowrquot; gt; wrote in message
...
gt; Is there a way to make a quot;resetquot; button to clear only select cells?
Norman Jones wrote
gt; Sub ClearCells()
gt; Dim Rng As Range
gt;
gt; Set Rng = Range(quot;A1:A20quot;) 'lt;lt;==== CHANGE
gt;
gt; Rng.Clear
gt;
gt; End Sub
gt;
Jumping in late here so don't know the OP's intent, but it seems fair to
point out that .Clear as opposed to .ClearContents clears everything,
including borders, Conditional Formatting, etc.
--
David
Hi David,
gt; Jumping in late here so don't know the OP's intent, but it seems fair to
gt; point out that .Clear as opposed to .ClearContents clears everything,
gt; including borders, Conditional Formatting, etc.
Hence my comment to the OP:
gt;gt; If your intention is to delete the contents but retain formats, change:
gt;gt;
gt;gt; Rng.Clear
gt;gt;
gt;gt; to:
gt;gt;
gt;gt; Rng.ClearContents
It is certainly fair to comment, but it is undoubtedly misleading to excise
the section of my response most directly pertinent to your comment.---
Regards,
Norman
quot;Davidquot; gt; wrote in message
...
gt; Norman Jones wrote
gt;
gt;gt; Sub ClearCells()
gt;gt; Dim Rng As Range
gt;gt;
gt;gt; Set Rng = Range(quot;A1:A20quot;) 'lt;lt;==== CHANGE
gt;gt;
gt;gt; Rng.Clear
gt;gt;
gt;gt; End Sub
gt;gt;
gt;
gt; Jumping in late here so don't know the OP's intent, but it seems fair to
gt; point out that .Clear as opposed to .ClearContents clears everything,
gt; including borders, Conditional Formatting, etc.
gt;
gt; --
gt; David
Norman Jones wrote
gt; It is certainly fair to comment, but it is undoubtedly misleading to
gt; excise the section of my response most directly pertinent to your
gt; comment.
Apologies. Totally missed that section. It was 5:00am and my eyes weren't
working yet.
--
David
Sorry, guys. The post wasn't displaying where I posted it (Excel general
?s). I happened across it just now when I displayed all threads.
quot;Maxquot; wrote:
gt; There were 2 responses (from me and Bob Phillips) to your earlier 2
gt; identical questions in this newsgroup some 3 days ago, which have not
gt; received any feedback from you in the threads.:
gt;
gt; a, tinyurl.com/bmrs5
gt; (Bob Phillips)
gt;
gt; b. tinyurl.com/bqg7y
gt; (Max)
gt; --
gt; Rgds
gt; Max
gt; xl 97
gt; ---
gt; Singapore, GMT 8
gt; xdemechanik
gt; savefile.com/projects/236895
gt; --
gt; quot;1vagrowrquot; gt; wrote in message
gt; ...
gt; gt; Is there a way to make a quot;resetquot; button to clear only select cells?
gt;
gt;
gt;
Don't know what happened, but trust that you've got what you wanted since,
from the many responses provided ..
--
Rgds
Max
xl 97
---
Singapore, GMT 8
xdemechanik
savefile.com/projects/236895
--
quot;1vagrowrquot; gt; wrote in message
...
gt; Sorry, guys. The post wasn't displaying where I posted it
gt; (Excel general ?s). I happened across it just now
gt; when I displayed all threads.
- Feb 22 Thu 2007 20:35
reset cells
close
全站熱搜
留言列表
發表留言