Quantcast
Channel: Active questions tagged excel - Stack Overflow
Viewing all articles
Browse latest Browse all 88054

Userform OptionButtons exclusive in two directions

$
0
0

I have a userform with buttons organized like a table in colums and rows. I want only one button activated for each column and row. For now it works with all buttons being option buttons and all optionbuttons of a row in the same frame. Then for the columns, I started to write for each button a sub of the type :

Private Sub Col1Row3_Click()

For i = 1 To 2
 Me.Controls("col1Row"& i) = False
Next i

For i = 4 To 14
 Me.Controls("col1Row"& i) = False
Next i

End Sub

It works, but I'm fairly confident there is a more elegant way. Any thoughts ? Thanks !


Viewing all articles
Browse latest Browse all 88054

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>