Clearing Check boxes

Nathan B

New Member
Joined
Apr 18, 2002
Messages
35
I'm back again for more help. This site is great. Here's my problem: I have an Excel worksheet that includes both cells and check boxes where the user can input information. I want to automate the process when the user wants to clear the input sections. I've tied the following macro to a button:
Sub Clear1()
Dim MyVar
MyVar = MsgBox("Are you sure you want to clear this record?", vbYesNo)
If MyVar = vbYes Then
Range("A5:N19").Select
Selection.ClearContents
ActiveWindow.SmallScroll Down:=12
Range("M21:N23").Select
Selection.ClearContents
Range("H21:I23").Select
Selection.ClearContents
Range("C21:D23").Select
Selection.ClearContents
Sheets("Employee Guide").Select
Range("C14:D14").Select
Selection.ClearContents
Range("C14").Select
End If

End Sub

This works great to clear the cells. However, this does not clear the check boxes that are on the worksheet. I'm using the check boxes that are found on the "Forms" toolbar, not the ones found on the "Control Toolbox" toolbar. What do I need to add to my macro to accomplish this. Also, on a side note, is there any way to change the font color used with this type of check box? Thanks
 

Excel Facts

Wildcard in VLOOKUP
Use =VLOOKUP("Apple*" to find apple, Apple, or applesauce

Forum statistics

Threads
1,214,515
Messages
6,119,973
Members
448,933
Latest member
Bluedbw

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top