Daniel
Daniel

Reputation: 7038

Macro to Display String on Checkbox Select

I have a checkbox on sheet1 (there are about 7 sheets total). If the checkbox is selected (true), I want it to say "Approved" in cell M9. If the checkbox is not selected (false), I want it to say "Denied" in the textbox.

Do I need to create a macro for that?

If I want it to display the same text in cell M5 of sheet2, how would I put it all together?

Upvotes: 0

Views: 2105

Answers (2)

krusaint
krusaint

Reputation: 111

Private Sub CheckBox1_Click()
If CheckBox1.Value = True Then
Range("M9").Value = "Approved"
Else
Range("M9").Value = "Denied"
Sheets("Sheet2").Range("M5").Value = "Denied"
End If
End Sub

Upvotes: 1

Fionnuala
Fionnuala

Reputation: 91356

You can link the status of a checkbox to a cell (right-click, format control, cell link on the control tab), this means you can then refer to that cell in any other sheet or cell.

Upvotes: 2

Related Questions