+ Reply to Thread
Results 1 to 3 of 3

Refrence to Listbox in form

Hybrid View

  1. #1
    Registered User
    Join Date
    12-20-2005
    Posts
    6

    Question Refrence to Listbox in form

    Hello, Im trying to populate a ListBox placed on form. I prefer to use OLEObject, however I can manage to get reference to Listboxes. It works fine when the Listbox is located in a sheet.

    Set wrkSheet = ThisWorkbook.Sheets("Input")
    Set OleObj = wrkSheet.OLEObjects("myListBox")

    works fine, but this dosent

    Set OleObj = myForm.OLEObjects("myListBox")

    I basicly I want to fill the listbox and be able to count which option that has been selected by the user.

    Kind regards

  2. #2
    Registered User
    Join Date
    12-20-2005
    Posts
    6
    Anyone? Need help on this one.

  3. #3
    Dave Peterson
    Guest

    Re: Refrence to Listbox in form

    Dim myLB As msforms.ListBox
    Set myLB = myform.Controls("MyListbox")



    rash wrote:
    >
    > Hello, Im trying to populate a ListBox placed on form. I prefer to use
    > OLEObject, however I can manage to get reference to Listboxes. It works
    > fine when the Listbox is located in a sheet.
    >
    > Set wrkSheet = ThisWorkbook.Sheets("Input")
    > Set OleObj = wrkSheet.OLEObjects("myListBox")
    >
    > works fine, but this dosent
    >
    > Set OleObj = myForm.OLEObjects("myListBox")
    >
    > I basicly I want to fill the listbox and be able to count which option
    > that has been selected by the user.
    >
    > Kind regards
    >
    > --
    > rash
    > ------------------------------------------------------------------------
    > rash's Profile: http://www.excelforum.com/member.php...o&userid=29765
    > View this thread: http://www.excelforum.com/showthread...hreadid=499776


    --

    Dave Peterson

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1