View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Patrick Molloy[_17_] Patrick Molloy[_17_] is offline
external usenet poster
 
Posts: 2
Default Check Box Code Does Not Work

Man, attitude. we're trying to help.

First, the code should be

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

Next. This is the click event for the checkbox, so be
sure that its on the worksheet's code page...the sheet on
which you have the checkbox...right click the sheet tab &
select view code

Finally, rather than moan about an error, tell us exactly
what the error is and on which line. We are here to help,
and this isn't a difficult process that you're stuck on.

Please keep us posted with your progress

Patrrick Molloy
Microsoft Excel MVP



-----Original Message-----
I have had four suggestions on how to make this work and

so far none will work. Now the True Statement has
something wrong.

Can anyone help?

Private Sub CheckBox1_Click()
With CheckBox1
If .Value = True Then
ActiveSheet.Range("A2").Value = _

Worksheets("Sheet2").Range("$B$4").Value
Else
If .Value = False Then
ActiveSheet.Range("A2") = ""
End If
End If
End With
End Sub

Thank You very much

.