Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() A userform have a listbox and a textbox. There are many lists in the listbox. example, 1403, 1405,......2005 i want to focus on the list of listbox when i input the specific list name to the textbox. ex) If I input 2000 in the textbox, the 2000 is selected and then focusing on the location. my code is following: Private Sub txtHo_Change() If Len(Me.txtHo) < 4 Then Exit Sub With Me.ListBox1 For i = 0 To .ListCount - 1 If .List(i) = CLng(txtHo) Then For k = 0 To .ListCount - 1 .Selected(k) = False Next .Selected(i) = True ''' here is code need End If Next End With End Sub *** Sent via Developersdex http://www.developersdex.com *** |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
userform listbox cannot get listbox.value to transfer back to main sub | Excel Programming | |||
avoiding duplicates in listbox (added from another listbox) | Excel Programming | |||
VBA: Creating listbox similar to the one in Pivot table (Listbox+Checkbox) | Excel Programming | |||
listbox.value not equal to listbox.list(listbox.listindex,0) | Excel Programming | |||
Is refreshing listbox rowsource in listbox click event possible? | Excel Programming |