![]() |
Listbox horizontal scrollbar problem
Hi All
I have a listbox with 3 columns. The first 2 have their width set to 0 and the third is left to default i.e. size itself (theorectically). The problem i'm having is that even though the contents of the 3rd column are greater than the width of the listbox the horizontal scrollbar is not being displayed. Does anyone have any ideas on this? The code i'm using to fill the listbox is: Do Until ADOrecordset.EOF lstAvailable.AddItem lstAvailable.Column(0, intcount) = ADOrecordset! ClientWorkID lstAvailable.Column(1, intcount) = ADOrecordset! WorkTypeCat lstAvailable.Column(2, intcount) = CStr(ADOrecordset! ClientName & " " & ADOrecordset!SchemeDesc & " " & ADOrecordset! WorkDesc & IIf(ADOrecordset!WorkTypeCat = 0, " (B)", " (F)")) ADOrecordset.MoveNext intcount = intcount + 1 Loop cheers Keith |
Listbox horizontal scrollbar problem
Don't know if this will help or not, but this is from the VBA help files.
Values for the TextColumn property range from €“1 to the number of columns in the list. The TextColumn value for the first column is 1, the value of the second column is 2, and so on. Setting TextColumn to 0 displays the ListIndex values. Setting TextColumn to €“1 displays the first column that has a ColumnWidths value greater than 0. If all else fails, reset the width of the listbox so that the column shows without a need for a scrollbar. "Keith74" wrote: Hi All I have a listbox with 3 columns. The first 2 have their width set to 0 and the third is left to default i.e. size itself (theorectically). The problem i'm having is that even though the contents of the 3rd column are greater than the width of the listbox the horizontal scrollbar is not being displayed. Does anyone have any ideas on this? The code i'm using to fill the listbox is: Do Until ADOrecordset.EOF lstAvailable.AddItem lstAvailable.Column(0, intcount) = ADOrecordset! ClientWorkID lstAvailable.Column(1, intcount) = ADOrecordset! WorkTypeCat lstAvailable.Column(2, intcount) = CStr(ADOrecordset! ClientName & " " & ADOrecordset!SchemeDesc & " " & ADOrecordset! WorkDesc & IIf(ADOrecordset!WorkTypeCat = 0, " (B)", " (F)")) ADOrecordset.MoveNext intcount = intcount + 1 Loop cheers Keith |
All times are GMT +1. The time now is 05:28 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com