View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.misc
keithl816
 
Posts: n/a
Default Adding a "CLEAR" button to the worksheet


Go to View/Toolbars/Control Toolbox/Click on the command button icon and
place on the sheet.

Right click the button and place this code into it (Change the cell
reference to the cells you want to affect). Then change the range to
suit.


Code:
--------------------

Sheets("sheet1").Activate
Range("a2,d2,f2,h2").Select
Selection.ClearContents

--------------------


Come out of design view and test. Make sure to test this on a copy.

Larry


--
keithl816
------------------------------------------------------------------------
keithl816's Profile: http://www.excelforum.com/member.php...o&userid=21287
View this thread: http://www.excelforum.com/showthread...hreadid=499182