Apr 14 2009, 05:25 PM
I have a ListBox that may not be wide enough to display all of the characters for some of the items in the ListBox. Is there a ListBox property that permits the User to click on an item to view all the characters for the item when the ListBox is not wide enough to show all the characters?
Thank you for any help.
Apr 14 2009, 06:13 PM
I have used:
To display the visible column (the second column in this case) of a listbox in a message box.
This could go in either the List Boxes Double click event or on a separate command button.
Apr 14 2009, 06:44 PM
Thank you but I was trying to let the User view the name on the Form (i.e. the ListBox) itself. Is that possible?
Thanks again for your help.
Apr 14 2009, 07:17 PM
don't think you can directly view the complete contents of the visible column of a list box if the text is wider than the width of the list box itself, short of amending the list box and column widths, temporarily, in code; but this could look pretty messy and I wouldn't recommend it.
CAn alternative might be to add an unbound text box on the form
1. Name = ListBoxData
2. Enabled = No
3. Locked = Yes
4. Back Style = Transparent
and in the List box After_Update (or On_Click) event put
Me.ListBoxData = Me![ListBoxName].Column(1)
Apr 14 2009, 07:34 PM
Thank you very much, Bernie.
went with your first suggestion and included a MsgBox when the User clicks an item in the ListBox that lets him either continue with the rest of the macro for the selected item or exit the sub.
Thanks much again.
Apr 14 2009, 08:28 PM
Good luck with your project.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here