multiple checkbox's

T

Tanya

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
 
D

David Sisson

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.
 
T

Tanya

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
 

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

Top