LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 789
Default display more info for listbox entry

Hi
replied privately, but I'll put the fix here to finish off the thread

Private Sub Listbox1_Click()
With ListBox1
UserForm1.Label1.Caption = .List(.ListIndex, 1)
UserForm1.Label2.Caption = .List(.ListIndex, 2)
End With
Me.Repaint
End Sub

regards
Paul

#DIV/0 wrote:

Thanks again,
The search part is working perfectly but the ListBox_Click only works with
the first item.

--
David M


" wrote:

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





 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Move cell info and info in range of cells on new entry abc[_2_] Excel Discussion (Misc queries) 5 February 15th 10 08:21 PM
Move cell info and info in neighboring cell on new entry belvy123 Excel Discussion (Misc queries) 6 June 25th 08 02:01 PM
DISPLAYING INFO IN A LISTBOX [email protected] Excel Programming 1 February 28th 05 01:19 PM
Data Entry Listbox Tom Ogilvy Excel Programming 0 January 19th 05 04:03 PM
Disappearing listbox entry Stuart[_5_] Excel Programming 1 February 26th 04 02:35 PM


All times are GMT +1. The time now is 09:49 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"