Macro to tick checkbox automatically

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,
I have a spreadsheet with a macro assigned to a button, with a checkbox
(from the control toolbar) next to this button for the user to manually tick
when they have run the macro. Is there a way for the checkbox to be ticked
automatically when the button is clicked?
Thanks!
 
Just add code in the macro assigned to the button

Activesheet.CheckBox1.Value = true
 
Thanks Tom, I've adapted this slightly as my checkboxes aren't necessarily
CheckBox1. I've inserted the following code into my macro and it works
nicely:

With ActiveSheet
.Checkboxes.Value = True
End With

I wondered if anyone knows whether checkboxes can be protected? Ideally I
would like my macro to determine whether the checkbox is ticked or not.

Regards, Paul
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top