Storing a single entry from a list into textbox

xxdcmast
04-16-2004, 03:19 PM
Am I right in assuming that to do this the command would be

text1.text = lstData.text when I do this however it comes out with a blank text box

LaVolpe
04-16-2004, 03:29 PM
you assumed correctly. If lstData doesn't have any listitems or none are selected, that would explain the blank text box.

xxdcmast
04-16-2004, 04:52 PM
you assumed correctly. If lstData doesn't have any listitems or none are selected, that would explain the blank text box.

It shows up with the correct item but it does not display in the text box.

webbone
04-16-2004, 05:20 PM
Just a suggestion to answer a few questions quickly - right before your 'text1.text =' line put a messagebox:


Msgbox "lstData.Text=" & lstData.Text & " - lstData.ListIndex=" & str(lstData.ListIndex)

LaVolpe
04-16-2004, 05:27 PM
It shows up with the correct item but it does not display in the text box.
If shows up with the correct item? Your listbox has only 1 item? Regardless, click on it.
Oh, hey, where are you putting your code? It should go in the listbox's Click() event.

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum