View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Dave Peterson Dave Peterson is offline
external usenet poster
 
Posts: 35,218
Default Determine check status of worksheet checkbox?

Checkbox from the Forms toolbar:

if worksheets("mySheet").checkboxes("myCheckbox").val ue = xlon then
'it's checked

Checkbox from the Control toolbox toolbar:

If Worksheets("mysheet").mycheckbox.Value = True Then
'it's checked

robotman wrote:

I have a checkbox on a worksheet but can't figure out how to tell in
VBA whether it's checked or not.

I reference the check box with:

Sheets("Mysheet").Shapes("MyCheckBox")

Can someone tell me the syntax to determine the check status?

Thanks.

John


--

Dave Peterson