Results 1 to 7 of 7

Thread: Listbox to Textbox

  1. #1

    Thread Starter
    Member
    Join Date
    May 2016
    Posts
    33

    Listbox to Textbox

    Hello everyone

    I wonder if it's possible to get textbox the value of a listbox without selecting this value

    Thank you

  2. #2

    Thread Starter
    Member
    Join Date
    May 2016
    Posts
    33

    Re: Listbox to Textbox

    for example I want the first value in the listbox go to the first textbox , the second value for the SECOND textbos and so on, but without having to select the values ​​in the list box

  3. #3
    PowerPoster techgnome's Avatar
    Join Date
    May 2002
    Posts
    34,687

    Re: Listbox to Textbox

    Listboxes have an Item property that contains the items in the listbox. Item(0) being the first one, Item(1) being the second and so on.

    -tg
    * I don't respond to private (PM) requests for help. It's not conducive to the general learning of others.*
    * I also don't respond to friend requests. Save a few bits and don't bother. I'll just end up rejecting anyways.*
    * How to get EFFECTIVE help: The Hitchhiker's Guide to Getting Help at VBF - Removing eels from your hovercraft *
    * How to Use Parameters * Create Disconnected ADO Recordset Clones * Set your VB6 ActiveX Compatibility * Get rid of those pesky VB Line Numbers * I swear I saved my data, where'd it run off to??? *

  4. #4

    Thread Starter
    Member
    Join Date
    May 2016
    Posts
    33

    Re: Listbox to Textbox

    Quote Originally Posted by techgnome View Post
    Listboxes have an Item property that contains the items in the listbox. Item(0) being the first one, Item(1) being the second and so on.

    -tg
    i try

    textbox1.text = Listbox1.item(0)

    but not work

  5. #5
    PowerPoster techgnome's Avatar
    Join Date
    May 2002
    Posts
    34,687

    Re: Listbox to Textbox

    That's about as meaningful as the reply you're about to get.

    Try removing the eels from your hovercraft.



    What do you mean "but not work"?
    Did you get an error? Did something happen that shouldn't have? Did the wheels fall off your car? Did your fingers fall off?
    We're not clairvoyant and we're not sitting in your lap, so we don't see what you see. You need to be a little more clearer.
    In my signature block, there's a link on how to remove eels from your hovercraft. Give it a read, won't take too long.

    -tg
    * I don't respond to private (PM) requests for help. It's not conducive to the general learning of others.*
    * I also don't respond to friend requests. Save a few bits and don't bother. I'll just end up rejecting anyways.*
    * How to get EFFECTIVE help: The Hitchhiker's Guide to Getting Help at VBF - Removing eels from your hovercraft *
    * How to Use Parameters * Create Disconnected ADO Recordset Clones * Set your VB6 ActiveX Compatibility * Get rid of those pesky VB Line Numbers * I swear I saved my data, where'd it run off to??? *

  6. #6

    Thread Starter
    Member
    Join Date
    May 2016
    Posts
    33

    Re: Listbox to Textbox

    Quote Originally Posted by techgnome View Post
    That's about as meaningful as the reply you're about to get.

    Try removing the eels from your hovercraft.



    What do you mean "but not work"?
    Did you get an error? Did something happen that shouldn't have? Did the wheels fall off your car? Did your fingers fall off?
    We're not clairvoyant and we're not sitting in your lap, so we don't see what you see. You need to be a little more clearer.
    In my signature block, there's a link on how to remove eels from your hovercraft. Give it a read, won't take too long.

    -tg
    its solved,

    just does not carry the data automatically when the listbox is filled ,

  7. #7
    PowerPoster techgnome's Avatar
    Join Date
    May 2002
    Posts
    34,687

    Re: Listbox to Textbox

    of course it doesn't... it does it only when you tell it to... it's not a binding you're adding, it's taking the current value and COPYING it to the text box...

    -tg
    * I don't respond to private (PM) requests for help. It's not conducive to the general learning of others.*
    * I also don't respond to friend requests. Save a few bits and don't bother. I'll just end up rejecting anyways.*
    * How to get EFFECTIVE help: The Hitchhiker's Guide to Getting Help at VBF - Removing eels from your hovercraft *
    * How to Use Parameters * Create Disconnected ADO Recordset Clones * Set your VB6 ActiveX Compatibility * Get rid of those pesky VB Line Numbers * I swear I saved my data, where'd it run off to??? *

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