Find Code:
All Words
Any of the Words
Exact Phrase
Home
:
Code
:
Forums
:
Submit
:
Mailing List
:
About
:
Contact
Code
All
VB.NET
ASP.NET
C#
VB Classic
ASP Classic
Snippets
Popular
Resources
Submit Code
Forums
Articles
Tips
Links
Books
Contest
Link to us
Purpose : Determine which element of an option but...
Author:
Wim De SmetAlintan
E-mail:
Click to e-mail author
Submitted:
4/17/2002
Version:
VB4
Compatibility:
VB4, VB5, VB6
Category:
Controls
Views:
8327
Purpose : Determine which element of an option button control array was selected in 1 line of code. Return : Index number of the selected option button.
Declarations:
'none
Code:
Function GetSelectedOption(Opt As Object) As Integer Dim i As Integer GetSelectedOption = 0 For i = Opt.LBound To Opt.UBound GetSelectedOption = -Opt(i).Value * i If GetSelectedOption > 0 Then Exit For Next End Function
Home
|
Forums
|
Submit
|
Books
|
Mailing List
|
Advertising
|
About
|
Contact
© 2024 A1VBCode. All rights reserved.
Legal disclaimer & terms of use
Privacy statement