How to add a clear forms button to a spreadsheet


Posted by ed rush on November 27, 2001 6:22 AM


Can you please tell me how to add a button to my excel worksheet that when clicked it will clear out information in selected cells.

Posted by Joe Was on November 27, 2001 6:36 AM

To delete the contents of a cell or group of selected cells:

Selection.ClearContents

is all you need. To expand the code and hard code it to defined cells put:

Range("X11:X22").Select

above the code to clear contents! JSW



Posted by Bassanio on December 01, 2001 3:52 AM

Which you could have got by ........

..... recording your actions on the macro recorder (Edit>Clear>Contents)