I'm sure this has been asked many a time, and I'm sure for what is probably a repeat post, but after much attempt I'm still failing at simply looping through all the controls on my form and outputting the name and caption of that object if it is an optionButton, Frame, CheckBox, or Label.
I currently have the code just for frame looking like this...
vb Code:
Dim ctl As Control For Each ctl In Me.Controls If TypeOf ctl Is OptionButton Then MsgBox (ctl.Caption) End If Next ctl
This loop appears to iterate but never see a msgbox... The above code works for a frame, but not for option buttons.... Any help would be appreciated! thanks!




Reply With Quote