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 Initializing Form Controls

Dim ctrl as control
for each ctrl in me.controls
if typeof ctrl is msforms.checkbox then
ctrl.value = false
end if
next ctrl

PosseJohn wrote:

I have a form that has many checkboxes. I would like to initialize all of
them to false.

What code would cycle thru the controls and determine if it is a checkbox?

For Each chk in Me.Controls
If ????
Me.Controls(chk) = False
End If
Next


--

Dave Peterson