check boxes

G

gall

Ok, my programming is a little rusty.

This is what I need to happen:

I have a worsheet that contains 2 checkboxes.

First..when I open the file I would like checkbox1 to have a check in it and
none in checkbox2.

If the user clicks on checkbox2, I would like to remove the check from
checkbox1. I also would like the cell c43 to contain the value from
worksheet2, cell h24.

If the user then clicks on checkbox1, I would like the check removed from
checkbox2 and the value in c44 to contain the value from worksheet2, cell i24.

If anyone can help, that would be great!
Tricia gall
 
S

stevebriz

For the first part

Right click each of the check boxes and select properties.
Then set the value to true for CHKBOX 1 and False for CHKBOX2
then part 2
Right click each of the check boxes and select view code
paste the code below appropriate to each of the check boxes.
then save Workbook ..close it and reopen.. and select enable macros

Private Sub CheckBox1_Click()
If CheckBox1.Value = True Then
CheckBox2.Value = False
Sheet1.Range("C43").Value = Sheet2.Range("H24").Value
Else
End If

End Sub
Private Sub CheckBox2_Click()
If CheckBox2.Value = True Then
CheckBox1.Value = False
Sheet1.Range("C44").Value = Sheet2.Range("I24").Value
Else
End If
End Sub

'---------------------------------------------
 

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