ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   check box (https://www.excelbanter.com/excel-programming/375162-check-box.html)

brino

check box
 
hi all !

i am trying to place some check boxes on a sheet and i want the
ckeckbox to place text into a field if the checkbox is ticked.
also i would like to use option buttons if i could.
i needed to be able to place some code in the check boxes, i tried but
it didnt work.
how would you do this ???

thanks
brino


Bob Phillips

check box
 
Just drag an optionbutton off of the forms toolbar, and you can assign a
macro by right-clicking and select from the menu.

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"brino" wrote in message
oups.com...
hi all !

i am trying to place some check boxes on a sheet and i want the
ckeckbox to place text into a field if the checkbox is ticked.
also i would like to use option buttons if i could.
i needed to be able to place some code in the check boxes, i tried but
it didnt work.
how would you do this ???

thanks
brino




Stopher

check box
 

Bob Phillips wrote:

Just drag an optionbutton off of the forms toolbar, and you can assign a
macro by right-clicking and select from the menu.

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"brino" wrote in message
oups.com...
hi all !

i am trying to place some check boxes on a sheet and i want the
ckeckbox to place text into a field if the checkbox is ticked.
also i would like to use option buttons if i could.
i needed to be able to place some code in the check boxes, i tried but
it didnt work.
how would you do this ???

thanks
brino


To put text in a cell if the text box is ticked, Right click on the
Checkbox and go to format control. Tick checked and give it an output
cell anywhere on sheet or on another sheet if you like. Now in the cell
that you want the text to appear type :

=IF(G1022 = TRUE,"Text like this","")

The G1022 is your Checkbox output cell reference and the "Text like
this" is the text you want to appear.

As for assigning macros to the checkbox, pick assign macro when you
right click on it. When you do it this way and you put your code in the
window that appears, the default macro is _Click () so this macro will
run everytime you check or uncheck the box, unless you put provisions
in your macro for that.

Stopher



All times are GMT +1. The time now is 07:46 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com