View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default Checkbox locked and will not unlock

Private Sub CheckBox1_Click()

If Range("N22").Text = "1" Or _
Range("N22").text = "2" Or _
Range("N22").text = "3" Then
CheckBox1.Value = False
CheckBox1.Enabled = False
Else
CheckBox1.Value = False
CheckBox1.Enabled = True

End If
End Sub

--
Regards,
Tom Ogilvy


"Rmagic" wrote in
message ...

Hello

I have a checkbox that i only want to become unlocked when a number is
put in this is my code
Private Sub CheckBox1_Click()

If ("N22") = "1" Or "2" Or "3" Then
CheckBox1.Value = False
CheckBox1.Enabled = False
Else
CheckBox1.Value = False
CheckBox1.Enabled = True

End If



End Sub

But it only works once and when you put other numbers in it still
remains locked??????


--
Rmagic
------------------------------------------------------------------------
Rmagic's Profile:

http://www.excelforum.com/member.php...o&userid=28595
View this thread: http://www.excelforum.com/showthread...hreadid=484673