View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default Assessing whether any checkboxes are checked within frame

Dim bChecked as Boolean
Dim ctl as Control

bChecked = False
for each ctl in Userform1.Frame1.Controls
if typeof ctl is MSForms.CheckBox then
if ctl.Value then
bChecked = True
exit for
end if
end if
Next
if bChecked = False then

msgbox "Please check on box"
End if

--
Regards,
Tom Ogilvy

"ExcelMonkey" wrote in message
...
Is it possible to check and see if at least 1 checkbox in a frame is

checked.
I am assuming that you have to group the checkboxes and check on of their
properties within a For Each loop

Thanks.