clear checkmark from checkboxes

reddcannon

Board Regular
Joined
Aug 11, 2011
Messages
118
I have excel 16 and windows 10

I have a button that clears all my data I imput etc and all is fine, however it does not clear the check marks out of the check boxes.

this is what I have for my clear data button
Private Sub CommandButton1_Click()
On Error Resume Next
Range("a1:g40").Value = vbNullString
On Error GoTo 0

End Sub

I don't want to uses another button for the check marks.
 

Excel Facts

Select all contiguous cells
Pressing Ctrl+* (asterisk) will select the "current region" - all contiguous cells in all directions.
set their value to false:
CheckboxName = False

You don't need On Error GoTo 0 here, and never at the end of a procedure.
 
Upvote 0
set their value to false:
CheckboxName = False

You don't need On Error GoTo 0 here, and never at the end of a procedure.
I dont know what you mean by set their value to false and checkboxname = false. Should I be using checkbox from activex controls? because I am using Form controls. Sorry for my ignorance
 
Upvote 0
set their value to false and checkboxname = false
There's a colon in what I wrote ( : ) - a separator for ideas or sentence parts.
checkboxname represents the name of your checkbox, which I presume you already have. As far as I know, that should work for either type. If your controls are on a userform, I'd use Me.YourCheckboxNameHere = False
 
Upvote 0
Solution

Forum statistics

Threads
1,224,616
Messages
6,179,909
Members
452,949
Latest member
beartooth91

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