View Single Post
  #7   Report Post  
Posted to microsoft.public.excel.programming
[email protected] paul.robinson@it-tallaght.ie is offline
external usenet poster
 
Posts: 789
Default display more info for listbox entry

Hi
That makes more sense then!
In the click event for the textbox you will need to run the code I put
in the initialisation sub. The thing you are searching for will be
Userform1.TB1.Text
in your If Then Else

regards
Paul


#DIV/0 wrote:

The TextBox "Parole" is still empty when you open the form so the initialize
function will do a search for nothing and populate the listbox with the whole
column and nothing changes when I type the text to find.
My way the form opens with an empty textbox and an empty list. I type the
word to search for and click (which is how websearches do it so is the way
people expect it to work). That populates the textbox with the full text only
from those cells containing the word I want.
Clicking on each item should display further details (as label captions) and
as I see that's what you addressed with the very first post. Duh!
Duh again! for missing the ColumnWidth in the properties window.
I'll work on what you've given me and will post back.

--
David M


" wrote:

Hi
The way I suggested in an earlier post.

Is the button you are clicking on the form with the listbox? If it is,
then it is very strange to populate the listbox using a button on the
same form - why not do the populating in the initialize sub as I
suggested? Now use your button to run the lable changing code.

regards
Paul

#DIV/0 wrote:

Hang on. Figured it. I left
ListBox1.ColumnCount = 3
ListBox1.ColumnWidths = ";0;0"
in UserForm_Initialize and put all the rest in the button_Click

Now I want the ListBox1_Click to put the values of the hidden columns into
label captions. How do I do that ? ListIndex ? Offset ?

--
David M