View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Nausett Nausett is offline
external usenet poster
 
Posts: 9
Default Is there a Macro to enable a check box based on the content of

I'm getting a Compile Error: Method or Data Member Not Found. Am I doing
something wrong?
Thanks,

"Tom Ogilvy" wrote:

The checkbox is a passive victim. Given the assumptions I made, if you have
a checkbox named checkbox1 (from the control toolbox toolbar) and it is
located on the sheet with the code, and you have a cell B9, and with the code
in the sheet module as I described, you change the value of B9 to 3 (as an
example), checkbox1 should get checked.

--
Regards,
Tom Ogilvy


"Nausett" wrote:

How do I get Excel the Checkbox to recognize the new Macro?

"Tom Ogilvy" wrote:

What changes the amount - someone editing the cell with the amount?


right click on the sheet tab and select view code.

Private Sub Worksheet_Change(ByVal Target As Range)
if Target.Address = "$B$9" then
If Target.Value 0 then
me.checkbox1.Value = True
else
me.checkbox1.Value = False
end if
End if
end sub

--
Regards,
Tom Ogilvy




"Nausett" wrote:

I want to be able to have a check appear in the box if I have an amount 0.