Hi all,
I need help with embedding an ActiveX ListBox Control on a webpage. There is a HTML Select Element that creates a ListBox as well BUT I am having trouble with some of Select Element methods and properties. Therefore I wanted to create an Active X ListBox where I am familiar with MS Forms 2 ListBox's properties and methods in VB Script.
Heres the code...There is nothing wrong with the ClassID of the ActiveX ListBox. It was verified properly with a book and the Windows Registry. BUT the scripts will NOT work as it doesnt recognise the AddItem method :MAD
Please HELP. Any help is greatly appreciated.
<object id=Listbox1 classid=clsid:8BD21D20-EC42-11CE-9E0D-00AA006002F3
standby="Downloading ActiveX object… Please Wait" width="152" height="164">
<param name=DisplayStyle value=2>
<param name=ScrollBars value=3>
<param name=Value value="ActiveX ListBox">
</object>
<script language="VBScript">
<!--
For i = 1 to 10
ListBox1.AddItem "Item " & i
Next
Sub ListBox1_Click
Msgbox "You clicked on " & ListBox1.List(ListBox1.ListIndex) & _
" out of " & ListBox1.ListCount & " items."
End Sub
-->
</script>


Reply With Quote