close

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

--
Regards,
Tom Ogilvyquot;PaulJquot; gt; wrote in message
...
gt; Hi,
gt; I have a spreadsheet with a macro assigned to a button, with a checkbox
gt; (from the control toolbar) next to this button for the user to manually
tick
gt; when they have run the macro. Is there a way for the checkbox to be
ticked
gt; automatically when the button is clicked?
gt; Thanks!
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

quot;Tom Ogilvyquot; wrote:

gt; Just add code in the macro assigned to the button
gt;
gt; Activesheet.CheckBox1.Value = true
gt;
gt; --
gt; Regards,
gt; Tom Ogilvy
gt;
gt;
gt; quot;PaulJquot; gt; wrote in message
gt; ...
gt; gt; Hi,
gt; gt; I have a spreadsheet with a macro assigned to a button, with a checkbox
gt; gt; (from the control toolbar) next to this button for the user to manually
gt; tick
gt; gt; when they have run the macro. Is there a way for the checkbox to be
gt; ticked
gt; gt; automatically when the button is clicked?
gt; gt; Thanks!
gt;
gt;
gt;

arrow
arrow
    全站熱搜
    創作者介紹
    創作者 software 的頭像
    software

    software

    software 發表在 痞客邦 留言(0) 人氣()