ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   value of option button (https://www.excelbanter.com/excel-programming/278261-value-option-button.html)

paradise

value of option button
 
i have create 5 userforms. in each form,there are 5 option buttons in
which user is only allowed to choose one. each option button is
assigned a numeric value of 1,2,3,4,5 respectively. How do i write a
visual basic code which allows me to calculate the value of all the
selected options for the 5 userforms? any help is appreciated:)

Paradise

merjet

value of option button
 
Dim c As Control
For Each c In Controls
If TypeName(c) = "OptionButton" Then
Debug.Print c.Name, c.Value
End If
Next c

HTH,
Merjet




All times are GMT +1. The time now is 10:40 AM.

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