Click View>Toolbars and select the Control Toolbox, then click the
"Command Button" control and, using your mouse, draw the button on
your worksheet. Then double click the button, press Ctrl-A, press
Delete, then insert this code:
Private Sub CommandButton1_Click()
Range("A1").Clear
End Sub
You can change the range above to suit your needs.
Now press Alt-Q to return to Excel. On the Control Toolbox toolbar,
click "Design Mode". Now you can click on your button and anything in
cell A1 will be deleted.
HTH,
JP
- Mostrar texto citado -