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 Selected item in combobox at DropButtonClick

On a userform I have a combobox with a number of integer numbers that are
years.
On DropButtonClick I would like to have a certain item (the current year)
selected and
have that item at about the middle (height-wise) of the combobox.
The combobox is populated like this:

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

With ComboBox1
.List = arrYears
.ListIndex = 100
.ListWidth = 48
.ColumnWidths = 48
End With

How could I do this without using SendKeys or the Windows API?


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
How to display the first Item in a combobox as the default item Nigel Excel Programming 2 December 8th 06 10:21 PM
How to display the first Item in a combobox as the default item Jim Cone Excel Programming 0 December 8th 06 06:42 PM
UserForm Combobox DropButtonClick Event Bug? [email protected] Excel Programming 4 November 27th 06 09:34 PM
use selected value from one combobox to populate another combobox rjudge[_7_] Excel Programming 3 April 14th 06 02:01 PM
ComboBox fails when last item selected first MBlake[_2_] Excel Programming 2 July 28th 05 07:51 PM


All times are GMT +1. The time now is 02:18 PM.

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

About Us

"It's about Microsoft Excel"