CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4

Thread: List Boxes

  1. #1
    Join Date
    Aug 2000
    Location
    England
    Posts
    185

    List Boxes

    In VBA, when an item in a list box is selected by code instead of the user is there a way to scroll down the list box and display the item selected?

    Thanks

    Andrew


  2. #2
    Join Date
    Mar 2001
    Location
    Tel Aviv, Israel
    Posts
    78

    Re: List Boxes

    Hi,

    If its the same as VB then:


    List1.Selected(desiredItemNum) = true
    List1.TopIndex = desiredItemNum







    ~&-)

  3. #3
    Join Date
    Aug 2000
    Location
    England
    Posts
    185

    Re: List Boxes

    No, that doesn't seem to work....


  4. #4
    Join Date
    Mar 2001
    Location
    Tel Aviv, Israel
    Posts
    78

    Re: List Boxes

    I suppose you got the idea that 'desiredItemNum' is a number you enter ?!

    It works fine for VB.

    Oren.



    ~&-)

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

Featured