Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi
I have two sheets Sheet 1 - has 13 check box's representing individual outcomes with macros attached to each which unlock and change the colour of cells immediately below the checkbox cell. Eg. Private Sub CheckBox1_Click() <<----------------------------- ActiveSheet.Unprotect Password:="BBHS" If CheckBox1 Then Yellow Else Green End If ActiveSheet.Protect Password:="BBHS" End Sub Sub Yellow() <<-------------------------------- ' ' Yellow Macro ' Macro recorded 26/05/2007 by Tanya Duffy ' Range("D4").Select Range(ActiveCell, ActiveCell.Offset(29, 0)).Select Selection.Locked = False With Selection.Interior .ColorIndex = 36 .Pattern = xlSolid .PatternColorIndex = xlAutomatic End With End Sub Sub Green() <<-------------------------------- ' ' Green Macro ' Macro recorded 26/05/2007 by Tanya Kaposi ' Range("D4").Select Range(ActiveCell, ActiveCell.Offset(29, 0)).Select With Selection.Interior .ColorIndex = 35 .Pattern = xlSolid .PatternColorIndex = xlAutomatic Selection.Locked = True End With End Sub sheet 2 - has 3 cells whose contents is required for a formula to run smoothly. Question! in any one reporting period there can be any combination of 3 outcomes, therefore is it posible to insert text in the range of 3 cells based on which checkboxes are selected when there are more checkboxes than cells for text? Any assistance will be appreciated. Regards Tanya |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
On May 28, 2:19 pm, Tanya wrote:
Question! in any one reporting period there can be any combination of 3 outcomes, therefore is it possible to insert text in the range of 3 cells based on which checkboxes are selected when there are more checkboxes than cells for text? So, when you select a checkbox, a text value is written to the sheet2 range? Or is that what you want to happen? If there are more checkboxes than ranges, then you have to make a chart with the results of all combinations. Then we can start writing some code to accomplish your task. |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hello David
Thank you for your patience, I am a novice at writing code. In answer to your question So, when you select a checkbox, a text value is written to the sheet2 range? Or is that what you want to happen? <<<--------------- This is what I would like to happen Therefore what type of chart do I need to create? Sheet1 has 13 checkboxes and sheet 2 has three cells where I text to appear, this text relates to the outcome number immediately above the checkbox i.e. H1.1; H1.2; H2.1 etc.... So I guess you are suggesting in a table/list which lists all variables for the three cells? something like this? C1 D1 E1 checkbox1 H1.1 H1.2 H2.1 H1.2 H2.1 H2.2 checkbox2 H1.1 H1.2 H2.1 H1.2 H2.1 H2.2 "David Sisson" wrote: On May 28, 2:19 pm, Tanya wrote: Question! in any one reporting period there can be any combination of 3 outcomes, therefore is it possible to insert text in the range of 3 cells based on which checkboxes are selected when there are more checkboxes than cells for text? So, when you select a checkbox, a text value is written to the sheet2 range? Or is that what you want to happen? If there are more checkboxes than ranges, then you have to make a chart with the results of all combinations. Then we can start writing some code to accomplish your task. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Crteating Multiple GIFS from Multiple Ranges -- need someone to test my code to see why it fails | Excel Programming | |||
view multiple files in multiple windows on multiple screens. | Excel Discussion (Misc queries) | |||
Problem identifying with Checkbox's status | Excel Programming | |||
looping through all checkbox's in a userform | Excel Programming | |||
declaring an array of CheckBox's | Excel Programming |