Thread: Check Box Code
View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
mudraker[_94_] mudraker[_94_] is offline
external usenet poster
 
Posts: 1
Default Check Box Code

Private Sub CheckBox1_Click()
If CheckBox1.Value = True Then ActiveSheet.Range("A2").Value =
"Sheet2!$B$4"
If CheckBox1.Value = False Then ActiveSheet.Range("A2") = ""
End Sub


or

Private Sub CheckBox1_Click()
With CheckBox1
If .Value = True Then ActiveSheet.Range("A2").Value = "Sheet2!$B$4"
If .Value = False Then ActiveSheet.Range("A2") = ""
End With
End Sub


---
Message posted from http://www.ExcelForum.com/