View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Kyla Dockery Kyla Dockery is offline
external usenet poster
 
Posts: 4
Default Clear check box macro

Hi Rick.

Thank you for responding to my email. I am having a problem with the code
you gave me though. When I compile my VBAProject it give me this error:

Compile Error:
Method or Data Member not Found

Also, should I be subsistuting another word for TypeName? If so what should
go here?

"Rick Hansen" wrote:

Hi Kyla, If your CheckBox's are in a userform and also believe on a
worksheet. You can us this code to clear all the checkbox's.

enjoy, Rick , FBKS, AK


Dim ctrl as Control

With Me
For Each ctrl In .Controls
if TypeName(ctrl) ="CheckBox" then
ctrl.value = False
endif
next ctrl

End With

"Kyla Dockery" wrote in message
...
In an excel program, I have set up a command button that will

automatically
clear out the information in certain cells. My problem is that within my
excell document I have some check boxes. I want to set my macro up so

that
it will also look at my check boxes and if the box is checked, I want it

to
uncheck it and if it is unchecked I want it to leave it alone. Can

someone
help me??