This article was previously published under Q159757
1.00 1.10 2.00
WINDOWS
kbprg kbhowto
Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.
View products that this article applies to.
********* BEGIN Page1.HTM *******************
<HTML>
<SCRIPT LANGUAGE="VBSCRIPT">
Sub ShowVals
Dim SelStr
For i = 0 to Form1.myselect.length - 1
If Form1.myselect.options(i).selected = True Then
selstr = selstr & Form1.myselect.options(i).value & chr(10)
End If
Next
MsgBox SelStr,,"Selected Item(s)"
End Sub
</SCRIPT>
<BODY>
<FORM NAME="Form1">
<SELECT MULTIPLE NAME="MySelect">
<OPTION VALUE="10">Option 1 (10)
<OPTION VALUE="20">Option 2 (20)
<OPTION VALUE="30">Option 3 (30)
</SELECT>
<INPUT TYPE=BUTTON onClick="ShowVals()" VALUE="Show Value(s)">
</FORM>
</BODY>
</HTML>
********* BEGIN End.HTM *******************
Keywords: KB159757, kbhowto