Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Position cursor in list box

Status
Not open for further replies.

accessguy

MIS
Oct 4, 1999
4
0
0
US
I have a list box looking up names in my database. I would like to have the cursor identifying the active line to be positioned in the middle of the list box and not at the bottom. Any suggestions?
 
Dim somevalue As Variant<br>
List21.SetFocus<br>
somevalue = 4<br>
List21.Selected(somevalue) = True<br>
<br>
Thats how you select something its up to you to figure out what.<br>
<br>
Or as your example stated in the &quot;middle&quot;<br>
<br>
Dim middle As Integer<br>
List21.SetFocus<br>
middle= List21.ListCount \ 2<br>
List21.Selected(middle) = True <p> DougP<br><a href=mailto: dposton@universal1.com> dposton@universal1.com</a><br><a href= > </a><br>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top