Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
check boxes
I have several check boxes on a sheet. I want to check
these boxes and return a 'Y' if it has been selected and a 'N' if it hasn't. Thanks in advance. gareth |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
check boxes
What kind of checkboxes. ActiveX from the control toolbox toolbar or excel
checkboxes from the forms toolbar. When do you want them to return Y or N? When the control is checked. If so, then without code, link the checkboxes to the cell over which they are located and which will contain True or False. Then in another cell, put in a formula like =if(b9,"Y","N") where B9 is the linked cell. Otherwise you would need to not linke the checkbox and use event code to place the Y or N in the cell. -- Regards, Tom Ogilvy "gareth" wrote in message ... I have several check boxes on a sheet. I want to check these boxes and return a 'Y' if it has been selected and a 'N' if it hasn't. Thanks in advance. gareth |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
check boxes
From the Forms toolbar.
I want to return a 'Y' or a 'N' in a macro. Should I link the cells and do it that way or is there another way? gareth -----Original Message----- What kind of checkboxes. ActiveX from the control toolbox toolbar or excel checkboxes from the forms toolbar. When do you want them to return Y or N? When the control is checked. If so, then without code, link the checkboxes to the cell over which they are located and which will contain True or False. Then in another cell, put in a formula like =if (b9,"Y","N") where B9 is the linked cell. Otherwise you would need to not linke the checkbox and use event code to place the Y or N in the cell. -- Regards, Tom Ogilvy "gareth" wrote in message ... I have several check boxes on a sheet. I want to check these boxes and return a 'Y' if it has been selected and a 'N' if it hasn't. Thanks in advance. gareth . |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
check boxes
Public Sub Btn_click()
Dim sName As String, cbx As CheckBox Dim rng As Range sName = Application.Caller Set cbx = ActiveSheet.CheckBoxes(sName) Set rng = cbx.TopLeftCell.Offset(0, -1) If cbx = xlOn Then rng.Value = "Y" Else rng.Value = "N" End If End Sub Assign this to all your checkboxes. It puts Y or N to the cell to the left of the cell with the checkbox over it. Or adjust it to fit you needs. -- Regards, Tom Ogilvy "gareth" wrote in message ... From the Forms toolbar. I want to return a 'Y' or a 'N' in a macro. Should I link the cells and do it that way or is there another way? gareth -----Original Message----- What kind of checkboxes. ActiveX from the control toolbox toolbar or excel checkboxes from the forms toolbar. When do you want them to return Y or N? When the control is checked. If so, then without code, link the checkboxes to the cell over which they are located and which will contain True or False. Then in another cell, put in a formula like =if (b9,"Y","N") where B9 is the linked cell. Otherwise you would need to not linke the checkbox and use event code to place the Y or N in the cell. -- Regards, Tom Ogilvy "gareth" wrote in message ... I have several check boxes on a sheet. I want to check these boxes and return a 'Y' if it has been selected and a 'N' if it hasn't. Thanks in advance. gareth . |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Copy and move check box (check boxes) with new cell link? | Excel Worksheet Functions | |||
How do I increase the size of check in check boxes | Excel Discussion (Misc queries) | |||
Enable check box in protected sheet + group check boxes | Excel Discussion (Misc queries) | |||
How do i create a value for check boxes or option boxes | Excel Discussion (Misc queries) | |||
Check Box influencing other Check Boxes | Excel Programming |