Your new button is ready to use.
- Click on View > Toolbars > Control Toolbox
- Find the Command Button icon and click on it
- Draw a button shape on your sheet with the mouse
- Right-click on the CommandButton1 that results and select Properties
- Find the Caption property in the left panel and change the text in the right panel to RESET GAME
- On the Control Toolbox Toolbar click on the Design Mode icon (this turns off macros temporarily and lets you edit them)
- Right-click on the RESET GAME button and select View Code, the VBEditor will open
- Insert this line of code in empty white space in between the sub flags:
From this code you can see how to list the cells to clear...![]()
Private Sub CommandButton1_Click() Range("A1:A3,B12,D4:G18,H20").ClearContents End Sub
- Edit the cell references to complete the list for your sheet
- Press Alt-Q to close the VBEditor
- Click on the Design Mode icon to revert to normal mode
- Save your sheet
Bookmarks