View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Rick Rothstein Rick Rothstein is offline
external usenet poster
 
Posts: 5,934
Default Set properties of a Check Box

You can't use Me in the Immediate Window if that is what you were doing.
This works fine in a code procedure though...

Me.CheckBox1.Value = True

In the Immediate Window, you can refer to the worksheet directly or via the
ActiveSheet object...

Worksheet("Sheet1").CheckBox1.Value = True

or

ActiveSheet.CheckBox1.Value = True

--
Rick (MVP - Excel)


"PCLIVE" wrote in message
...
I've used something like this to set the properties of a ToggleButton.

Me.ToggleButton5.Value = False

How can I do this same sort of thing with a Check Box, also created from
the Control Toolbox?

I've tried the similar syntax, but I get an error.

Me.CheckBoxName.Value = False 'Invalid use of Me keyword
ActiveSheet.Shapes("CheckBoxName").Value = False 'Object doesn't
support this property or method

What code is necessary to set the properties of a checkbox?

Thanks in advance,
Paul





--