PDA

View Full Version : Solved: Checkbox code?



Blackie50
05-21-2010, 08:05 AM
Hi,
Having trouble with testing the state of a checkbox (not userform) as part of a macro - keep getting 'object required'

If CheckBox1.Value And Range("g49").Value < 0 And Range("g49").Value < -2.49 Then

Tried it a few ways e.g .value = true & .checkstate =1

Any help appreciated

I'm basically asking if the checkbox is 'checked' and testing the value of G49.

thanks
Jon

mdmackillop
05-21-2010, 08:52 AM
If ActiveSheet.CheckBox1.Value And Range("g49").Value < 0 And Range("g49").Value < -2.49 Then
but I think there is a logic error in your < statements