Counting checkboxes

T

Tom Ogilvy

Dim ctrl as Control
Dim icnt as long
icnt = 0
for each ctrl in Userform1.Controls
if typeof ctrl is MSForms.CheckBox then
icnt = icnt + 1
end if
Next
msgbox "there are " & icnt & " checkboxes"
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top