Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 120
Default 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

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,986
Default 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


Reply
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
Unwanted Listbox Horizontal Scrollbar Zone[_2_] Excel Programming 1 March 12th 07 05:26 PM
Horizontal Scrollbar tikchye_oldLearner57 New Users to Excel 2 March 27th 06 06:42 PM
Needless Horizontal scrollbar in Listbox Ken Soenen Excel Programming 2 February 21st 06 04:13 PM
Horizontal Scrollbar For Lisbox Justin Starnes[_2_] Excel Programming 5 October 20th 04 11:26 AM
Horizontal scrollbar in ListBox Anirban Excel Programming 2 October 14th 04 02:05 PM


All times are GMT +1. The time now is 01:48 PM.

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"