For Each Combobox
You need to traverse through all of the controls and determine which ar combo
boxes something like this...
Dim ctl As Control
Dim lng As Long
For Each ctl In Me.Controls
If TypeOf ctl Is msforms.ComboBox Then lng = lng + 1
Next ctl
MsgBox lng
--
HTH...
Jim Thomlinson
"jlclyde" wrote:
Can you use a For each statement in VBA to go through the comboboxes
on a form and tell you how many are filled in? This woudl be easier
then listing them all in the code and doing if statements for each
one.
Thanks,
Jay
|