Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #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

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Adding Worksheet To Formula roy.okinawa Excel Worksheet Functions 3 November 27th 05 11:41 PM
Adding columns to a worksheet Traci Excel Worksheet Functions 3 August 29th 05 10:51 PM
Comparing a list to a Calendar worksheet. PatrickL Excel Worksheet Functions 0 August 25th 05 04:21 PM
adding a command button to an excel cell? betelguese Excel Discussion (Misc queries) 1 March 22nd 05 03:09 AM
Macro to simply bring up the Find dialogue box?? marika1981 Excel Discussion (Misc queries) 14 January 14th 05 10:47 PM


All times are GMT +1. The time now is 02:27 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"