Results 1 to 2 of 2

Thread: Embedding an ActiveX ListBox Control on a Webpage

  1. #1

    Thread Starter
    Hyperactive Member SoftwareMaker's Avatar
    Join Date
    Mar 2001
    Location
    Elbonia with Dilbert and Wally
    Posts
    322
    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>
    William T
    Software Architect / Chief Software Developer
    Softwaremaker.Net Pte Ltd
    http://www.Softwaremaker.net

    *** Things are always the darkest before they go pitch black ***

  2. #2
    New Member
    Join Date
    Apr 2001
    Location
    karachi,Pakistan
    Posts
    8
    i u havent defined additem property of the activex control
    define it then use read property event to read the value of property.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width