View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Lenny_821[_10_] Lenny_821[_10_] is offline
external usenet poster
 
Posts: 1
Default Count CheckBoxes in UserForm


Works great, just what I was looking for:):)

Thanks

Lenny


Tom Ogilvy Wrote:
Dim ctrl as MsForms.Control, cnt as Long
cnt = 0
for each ctrl in Userform1.Controls
if typeof ctrl is msforms.checkbox then
cnt = cnt + 1
end if
Next
msgbox cnt

--
Regards,
Tom Ogilvy

"Lenny_821" wrote in message
...

Hi All,

I've got a few CheckBoxes in a UserForm. How can I count the
CheckBoxes in VBA??

Please help:)

Lenny


--
Lenny_821

------------------------------------------------------------------------
Lenny_821's Profile:

http://www.excelforum.com/member.php...o&userid=15179
View this thread:

http://www.excelforum.com/showthread...hreadid=319438



--
Lenny_821
------------------------------------------------------------------------
Lenny_821's Profile: http://www.excelforum.com/member.php...o&userid=15179
View this thread: http://www.excelforum.com/showthread...hreadid=319438