LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,452
Default remove horizontal scrollbar combobox

On a Excel VBA userform I have a Combobox holding a
number of years as long numbers in the format yyyy.
These number are in a 1-D array.
The combobox properties are set in the UserForm initialize event like this,
showing only the essential bits:

Private Sub UserForm_Initialize()

Dim i As Long

With MonthView1
.Appearance = cc23D
End With

For i = 1 To 111
arrYears(i) = Year(Date) - (101 - i)
Next

With ComboBox1
.List = arrYears
.Value = Year(Date)
.ListIndex = 100
.ListWidth = 48
End With

End Sub

Now when I click the combobox dropdown button the list will have a
horizontal scrollbar, which I don't need
and which looks messy. I am not sure why it shows as all the years show
fully and the width is only 4 characters.
I even tried get rid of it with the Windows API, but no luck yet.
How do I do this?


RBS



 
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
Troubleshoot horizontal scrollbar LinDee Excel Worksheet Functions 1 September 11th 06 06:27 PM
Horizontal Scrollbar tikchye_oldLearner57 New Users to Excel 2 March 27th 06 06:42 PM
adding an horizontal scrollbar to columns Sam Excel Discussion (Misc queries) 1 April 7th 05 12:05 AM
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 02:34 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"