When attempting to determine which option buttons a user has selected from an array of option buttons, use this code instead of using an inefficient If-Then construct:
intSelectedItem = Option(0).Value * O - _
Option(1).Value*1 - Option(2).Value * 2
If you have more than a few items, put this code in a loop:
intSelectedItems = 0 For iCount = 0 to N 'N = total number of option boxes minus one intSelectedItem = - _ Option(iCount).Value * iCount Next
intSelectedItem is the index of the option button that the user selected.
Popularity: 7% [?]
RSS feed for comments on this post · TrackBack URI
Leave a reply