for each optionbutton

  • Thread starter Thread starter masterphilch
  • Start date Start date
M

masterphilch

Hi

I've got a Form with some OptionButtons. Now I preferably want to step
through each OptionButton.
Is it somehow possible to do it like For Each OptionButton In formname?

thx for help
 
Hi MastrPhilch,

Try something like:

Dim Ctl As msforms.Control

For Each Ctl In UserForm1.Controls
If TypeOf Ctl Is msforms.OptionButton Then
'do something, e.g.:
Ctl.Visible = False
End If
Next
 

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

Back
Top