ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   for each optionbutton (https://www.excelbanter.com/excel-programming/340729-each-optionbutton.html)

masterphilch

for each optionbutton
 
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

Norman Jones

for each optionbutton
 
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


---
Regards,
Norman



"masterphilch" wrote in message
...
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





All times are GMT +1. The time now is 09:55 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com